• [1310] Horse Jump

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • XP and EG like playing Chinese chess. One day when they were playing Chinese chess. The scrupulous EG found that the horse can get everywhere of the chessboard. EG want to
    know if the horse jump x and y(in stead of 2 and 1) int one step. Whether it can also get everywhere of the chessboard. We can ensure the chessborad is very large. So the hard work was left for XP; But XP is too lazy to finish it. Be the good friend of him. You may give him a hand.
  • 输入
  • The fist line with a positive integer t, stands for the test case; then following with t lines. Each lines two positive integers x,y(1<=x,y<=60000) stand for how the horse jump.
  • 输出
  • For each test. if the horse can get erverywhere of the chessborad print "Yes!" in one line, or print"No!".
  • 样例输入
  •  2
     2 1
     1 1
  • 样例输出
  • Yes!
    No!
  • 提示
  • 来源
  • 加多宝凉茶
  • 操作

显示春菜