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 = list(map(int, input().split()))
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    x, y = list(map(int, input().split()))
    if x >= sx + 1:
        a += 1
    if y >= sy + 1:
        b += 1
    if x <= sx - 1:
        c += 1
    if y <= sy - 1:
        d += 1
if a >= b and a >= c and a >= d:
    print(a)
    print(sx + 1, end=" ")
    print(sy)
elif b >= a and b >= c and b >= d:
    print(b)
    print(sx, end=" ")
    print(sy + 1)
elif c >= a and c >= b and c >= d:
    print(c)
    print(sx - 1, end=" ")
    print(sy)
else:
    print(d)
    print(sx, end=" ")
    print(sy - 1)
