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
m = 1000000000
n, sx, sy = map(int, input().split())
c = [tuple(int(_) for _ in input().split()) for i in range(n)]

bst, ans = 0, None
if sx > 0:
    v = sum(1 for p in c if p[0] < sx)
    if v > bst:
        bst, ans = v, (sx - 1, sy)

if sy > 0:
    v = sum(1 for p in c if p[1] < sy)
    if v > bst:
        bst, ans = v, (sx, sy - 1)

if sx < m:
    v = sum(1 for p in c if p[0] > sx)
    if v > bst:
        bst, ans = v, (sx + 1, sy)

if sy < m:
    v = sum(1 for p in c if p[1] > sy)
    if v > bst:
        bst, ans = v, (sx, sy + 1)

print(bst)
print(*ans)
