import sequtils, strscans const m = [ (1, 2), (1, -2), (2, 1), (2, -1), (-1, 2), (-1, -2), (-2, 1), (-2, -1), ] var b = false.repeat(13).repeat(13) list = [@[(6, 6)], @[], @[], @[]] b[6][6] = true for i in 0 ..< 3: for (lx, ly) in list[i]: for (mx, my) in m: if b[lx + mx][ly + my]: continue else: b[lx + mx][ly + my] = true list[i.succ].add (lx + mx, ly + my) let (_, x, y) = stdin.readLine.scanTuple "$i $i" if x.abs > 6 or y.abs > 6: echo "NO" quit() echo: if b[x.succ 6][y.succ 6]: "YES" else: "NO"