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
input = raw_input
N,X,Y = map(int, input().split())

arr = [[int(x) for x in input().split()] for _ in range(N)]

a = b = c = d = 0
for x in arr:
  if x[0] <= X-1: a += 1
  elif x[0] >= X+1: b += 1

  if x[1] <= Y-1: c += 1
  else: d += 1

if X == 0: a = 0
if Y == 0: c = 0
m = max(a,b,c,d)

print(m)
if m == a:
  print(X-1,Y)
elif m == b:
  print(X+1, Y)
elif m == c:
  print(X, Y-1)
else:
  print(X, Y+1)
