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
k, sx, sy = map(int, input().split())
coords = []
ne = []
nw = []
se = []
sw = []

n = []
e = []
s = []
w = []

nn = 0
ss = 0
ee = 0
ww = 0


for i in range(k):
  a, b = map(int, input().split())
  if a > sx:
    # EAST
    if b > sy:
      # NORTH
      ne.append([a,b])
      nn +=1
      ee += 1
    elif b < sy:
      # SOUTH
      se.append([a,b])
      ss += 1
      ee += 1
    else:
      # DIRECT EAST
      e.append([a,b])
      ee += 1
  elif a < sx:
    # WEST
    if b > sy:
      # NORTH
      nw.append([a,b])
      nn += 1
      ww += 1
    elif b < sy:
      # SOUTH
      sw.append([a,b])
      ss += 1
      ww += 1
    else:
      # DEAD WEST
      w.append(a,b)
      ww += 1
  else:
    # N/S DIRECT
    if b > sy:
      n.append([a,b])
      nn += 1
    else:
      s.append([a,b])
      ss += 1

# check which is the greatest....

if nn >= ss and nn >= ee and nn >= ww:
  print(nn)
  print(sx, sy+1)
  exit()
if ss >= nn and ss >= ee and ss >= ww:
  print(ss)
  print(sx, sy-1)
  exit()
if ee >= ss and ee >= nn and ee >= ww:
  print(ee)
  print(sx+1, sy)
  exit()
if ww >= ss and ww >= ee and ww >= nn:
  print(ww)
  print(sx-1, sy)
  exit()
  




  