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

#q = int(input())
#x, y = map(int,input().split(' '))
#print (' '.join(list(map(str, s))))

n, sx, sy = map(int,input().split(' '))
t = []
for i in range(n):
    t.append(list(map(int, input().split(' '))))

cnt_xl = 0
cnt_xm = 0
cnt_yl = 0
cnt_ym = 0

for i in range(n):
    if t[i][0] > sx:
        cnt_xm = cnt_xm + 1
    elif t[i][0] < sx:
        cnt_xl = cnt_xl + 1
    if t[i][1] > sy:
        cnt_ym = cnt_ym + 1
    elif t[i][1] < sy:
        cnt_yl = cnt_yl + 1

ans = 0
px, py = 0, 0

if cnt_xm > cnt_xl:
    ans = cnt_xm
    px, py = 1, 0
else:
    ans = cnt_xl
    px, py = -1, 0

if ans < cnt_ym:
    ans = cnt_ym
    px, py = 0, 1

if ans < cnt_yl:
    ans = cnt_yl
    px, py = 0, -1

print(ans)
print(sx+px, sy+py)
    