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 math import *
first = input().split(" ",)
q = int(first[0])
sx = int(first[1])
sy = int(first[2])
sta = []
sts = []
first = 0
second = 0
third = 0
fourth = 0


for x in range(0,q):
    sta.append(input().split(" "))
    if int(sta[x][1]) > sy:
        first = first + 1
    if int(sta[x][0]) < sx:
        second = second + 1
    if int(sta[x][1]) < sy:
        third = third + 1
    if int(sta[x][0]) > sx:
        fourth = fourth + 1

n= max(first,second,third,fourth)
if n == first:
    print(n)
    print(sx,sy+1)
elif n==second:
    print(n)
    print(sx-1,sy)
elif n==third:
    print(n)
    print(sx,sy-1)
elif n==fourth:
    print(n)
    print(sx+1,sy)
