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
x=input().split(" ")
a=int(x[0])
b=int(x[1])
c=int(x[2])
n=0
w=0
e=0
s=0
for i in range (a):
    z=input().split(" ")
    b1=int(z[0])
    c1=int(z[1])
    if b>b1:
        w+=1
    if b<b1:
        e+=1
    if c>c1:
        s+=1 
    if c<c1:
        n+=1
if max(n,w,e,s)==n:
    print(n)
    print (b,c+1)
elif max(n,w,e,s)==s:
    print(s)
    print (b,c-1)
elif max(n,w,e,s)==e:
    print(e)
    print (b+1,c)
elif max(n,w,e,s)==w:
    print(w)
    print (b-1,c)