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 sys
n,sx,sy=map(int,input().split())
c1=0
c12=0
c2=0
c23=0
c3=0
c34=0
c4=0
c41=0
a12=0
a23=0
a34=0
a41=0
for i in range(n):
    x,y=map(int,sys.stdin.readline().split())
    if x>sx:
        if y>sy:
            c1+=1
        elif y<sy:
            c4+=1
        else:
            c41+=1
    elif x<sx:
        if y>sy:
            c2+=1
        elif  y<sy:
            c3+=1
        else:
            c23+=1
    else:
        if y<sy:
            c34+=1
        else:
            c12+=1
a12=c1+c12+c2
a23=c2+c23+c3
a34=c3+c34+c4
a41=c4+c41+c1
answer=max(a12,a23,a34,a41)
if a12==answer:
    print(answer)
    print(sx,sy+1)
elif a23 == answer:
    print(answer)
    print(sx-1, sy)
elif a34 == answer:
    print(answer)
    print(sx, sy -1)
elif a41 == answer:
    print(answer)
    print(sx+1, sy )

