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
n,x,y=list(map(int,input().split()))
l=[]
for _ in range(n):
    l.append(list(map(int,input().split())))
p1=[x-1,y]
p2=[x,y+1]
p3=[x+1,y]
p4=[x,y-1]
a1=0
a2=0
a3=0
a4=0
for i in l:
    if i[0]<=p1[0]:
        a1+=1
    if i[1]>=p2[1]:
        a2+=1
    if i[0]>=p3[0]:
        a3+=1
    if i[1]<=p4[1]:
        a4+=1
th=max(a1,a2,a3,a4)
print(th)
if a1==th:
    print(*p1)
elif a2==th:
    print(*p2)
elif a3==th:
    print(*p3)
elif a4==th:
    print(*p4)
