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
n, s0, s1 = [int(s) for s in input().split()]
count = [0,0,0,0] # left, right, down, up
for i in range(n):
    x, y = [int(s) for s in input().split()]
    count[0] += (x < s0)
    count[1] += (x > s0)
    count[2] += (y < s1)
    count[3] += (y > s1)
# s0, s1 = 500000000, 500000000
# n = 200000
# posi = []
# for i in range(n):
#     posi.append((random.randint(0,1000000000),random.randint(0,1000000000)))
# # print(time.time())
# for x,y in posi:
#     count[0] += (x < s0)
#     count[1] += (x > s0)
#     count[2] += (y < s1)
#     count[3] += (y > s1)
# print(time.time())
win = max(count)
print(win)
if count[0] == win:
    print('{} {}'.format(s0-1,s1))
elif count[1] == win:
    print('{} {}'.format(s0+1, s1))
elif count[2] == win:
    print('{} {}'.format(s0, s1-1))
else:
    print('{} {}'.format(s0,s1+1))

# print(time.time())