CF112B.Petya and Square

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Little Petya loves playing with squares. Mum bought him a square 2n×2n2n×2n in size. Petya marked a cell inside the square and now he is solving the following task.

The task is to draw a broken line that would go along the grid lines and that would cut the square into two equal parts. The cutting line should not have any common points with the marked cell and the resulting two parts should be equal up to rotation.

Petya wants to determine whether it is possible to cut the square in the required manner given the sizes of the square side and the coordinates of the marked cell. Help him.

输入格式

The first line contains three space-separated integers 2n2n , xx and yy ( 2<=2n<=100,1<=x,y<=2n2<=2n<=100,1<=x,y<=2n ), representing the length of a square's side and the coordinates of the marked cell. It is guaranteed that 2n2n is even.

The coordinates of the marked cell are represented by a pair of numbers xx yy , where xx represents the number of the row and yy represents the number of the column. The rows and columns are numbered by consecutive integers from 11 to 2n2n . The rows are numbered from top to bottom and the columns are numbered from the left to the right.

输出格式

If the square is possible to cut, print "YES", otherwise print "NO" (without the quotes).

输入输出样例

  • 输入#1

    4 1 1
    

    输出#1

    YES
    
  • 输入#2

    2 2 2
    

    输出#2

    NO
    

说明/提示

A sample test from the statement and one of the possible ways of cutting the square are shown in the picture:

首页