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
# Excellence is an art won by training and habituation. Aristotle
# by : Blue Edge - Create some chaos

z=1
z=0
if z>0:
    import sys
    sys.stdin = open('input.txt', 'r')

n,sx,sy=map(int,input().split())
d=[0,0,0,0]
c=[(sx-1,sy),(sx,sy+1),(sx+1,sy),(sx,sy-1)]
for _ in range(n):
    x,y=map(int,input().split())
    x-=sx
    y-=sy
    d[0]+=x<0
    d[1]+=y>0
    d[3]+=y<0
    d[2]+=x>0

# print(d)
# print(c)
i=d.index(max(d))
print(d[i])
print(*c[i])
