1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
from sys import stdin, stdout


def main():
  n,sx,sy = map(int,input().split())
  x, y = [], []
  for i in range(n):
    tx, ty = map(int,stdin.readline().split())
    x.append(tx)
    y.append(ty)
  
  dx = [sx+1, sx+0, sx-1, sx+0]
  dy = [sy+0, sy+1, sy+0, sy-1]
  ans, tmp = ['0'], 0
  for i in range(4):
    tmp = 0
    if 0 <= dx[i] <= 1000000000 and 0 <= dy[i] <= 1000000000:
      for j in range(n):
        if x[j] >= dx[i] and i == 0:
          tmp += 1
        elif y[j] >= dy[i] and i == 1:
          tmp += 1
        elif x[j] <= dx[i] and i == 2:
          tmp += 1
        elif y[j] <= dy[i] and i == 3:
          tmp += 1
    if tmp > int(ans[0]):
      ans = [str(tmp), '\n', str(dx[i]), ' ', str(dy[i]), '\n']
  stdout.write(''.join(ans))

if __name__ == "__main__":
  main()