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
#!/usr/bin/env python3
import sys

#lines = stdin.readlines()
def rint():
    return map(int, sys.stdin.readline().split())

def input():
    return sys.stdin.readline().rstrip('\n')

def oint():
    return int(input())

n, sx, sy = rint()
xy = []
c = [0 for i in range(8)]
for i in range(n):
    x, y = rint()
    if x < sx:
        if y == sy:
            c[7] +=1
        elif y > sy:
            c[0] += 1
            c[1] += 1
            c[7] += 1
        else:
            c[7] += 1
            c[6] += 1
            c[5] += 1
    elif x == sx:
        if y > sy:
            c[1] += 1
        elif y < sy:
            c[5] += 1
    elif x > sx:
        if y == sy:
            c[3] += 1
        elif y > sy:
            c[1] += 1
            c[2] += 1
            c[3] += 1
        else:
            c[3] += 1
            c[4] += 1
            c[5] += 1

maxc = max(c)
if maxc == c[0]:
    ans = [sx-1, sy +1]
elif maxc == c[1]:
    ans = [sx, sy +1]
elif maxc == c[2]:
    ans = [sx+1, sy +1]
elif maxc == c[3]:
    ans = [sx+1, sy]
elif maxc == c[4]:
    ans = [sx+1, sy -1]
elif maxc == c[5]:
    ans = [sx, sy -1]
elif maxc == c[6]:
    ans = [sx-1, sy -1]
elif maxc == c[7]:
    ans = [sx-1, sy]

print(maxc)
print(*ans)

