2003' ACM/ICPCѵϰ 21

E: It's Logical