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, sx, sy = map(int, input().split())
k1 = 0
k2 = 0
k3 = 0
k4 = 0
onxu = onxd = onyl = onyr = 0
for i in range(n):
    x, y = map(int, input().split())
    if x > sx and y > sy:
        k1 += 1
    elif x < sx and y > sy:
        k2 += 1
    elif x < sx and y < sy:
        k3 += 1
    elif x > sx and y < sy:
        k4 += 1
    elif x == sx and y > sy:
        k1 += 1
        k2 += 1
        onxu += 1
    elif x == sx and y < sy:
        k3 += 1
        k4 += 1
        onxd += 1
    elif y == sy and x < sx:
        k2 += 1
        k3 += 1
        onyl += 1
    elif y == sy and x > sx:
        onyr += 1
        k1 += 1
        k4 += 1

mx = max(k1, k2, k3, k4, onxd, onxu, onyl, onyr)
print(mx)
if k1 == k4 == mx:
    print(sx + 1, sy)
elif k2 == k3 == mx:
    print(sx - 1, sy)
elif k1 == mx:
    print(sx + 1, sy + 1)
elif k2 == mx:
    print(sx - 1, sy + 1)
elif k3 == mx:
    print(sx - 1, sy - 1)
elif k4 == mx:
    print(sx + 1, sy - 1)
elif onxu == mx:
    print(sx, sy + 1)
elif onxd == mx:
    print(sx, sy - 1)
elif onyr == mx:
    print(sx + 1, sy)
elif onyl == mx:
    print(sx - 1, sy)
