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 = map(int,input().split())
list1 = list()
list2 = list()
list3 = list()
list4 = list()
sum=0
for i in range(n):
    a,b = map(int,input().split())

    if a>x and b>y:
        list1.append([a,b])
        list2.append([a,b])

    if a>x and b<y:
        list2.append([a,b])
        list3.append([a,b])
    if a<x and b>y:
        list4.append([a,b])
        list1.append([a,b])
    if a<x and b<y:
        list3.append([a,b])
        list4.append([a,b])
    if a==x:
        if b>y:
            list1.append([a,b])
        else:
            list3.append([a,b])
    if b==y:
        if a>x:
            list2.append([a,b])
        else:
            list4.append([a,b])
maximum = -1
t = [len(list1),len(list2),len(list3),len(list4)]
p=-1
for i in range(len(t)):
    if maximum<t[i]:
        maximum=t[i]
        p=i

print(maximum)

if p==0:
    print(x,y+1)
elif p==1:
    print(x+1,y)
elif p==2:
    print(x,y-1)
else:
    print(x-1,y)


