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
import math
n,sx,sy = map(int, input().strip().split(' '))
r=0
l=0
u=0
d=0
for i in range(n):
    #n=int(input())
    hx,hy = map(int, input().strip().split(' '))
    if hx>sx:
        r+=1
    if hx<sx:
        l+=1
    if hy>sy:
        u+=1
    if hy<sy:
        d+=1
m=max(u,d,l,r)
if u==m:
    print(u)
    print(hx,hy+1,end=" ")
    print()
elif d==m:
    print(d)
    print(hx,hy-1,end=" ")
    print()
elif l==m:
    print(l)
    print(hx-1,hy,end=" ")
    print()
elif r==m:
    print(r)
    print(hx+1,hy,end=" ")
    print()
    