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
import sys
from collections import deque
ints = deque(int(x) for x in sys.stdin.read().split())

def main():
  n, x0, y0 = (ints.popleft() for i in range(3))
  xy = [(ints.popleft(), ints.popleft()) for i in range(n)]
  locs = [(0,1), (0,-1), (1,0), (-1,0)]
  between = lambda x0,x,dx: (dx>=0 and x>=x0) or (dx<=0 and x<=x0)
  num = {(x0+dx,y0+dy): sum(between(x0,x,dx) and between(y0,y,dy) for x,y in xy) for dx,dy in locs}
  ans = max(num, key=lambda k:num[k])
  print(num[ans])
  print(*ans)
  return

while ints:
  main()