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, xs,xy=map(int,input().split())
n1 = 0
n2 = 0
n3 = 0
n4 = 0
for i in range(n):
    x,y = map(int, input().split())
    if x > xs:
        n1 += 1
    elif x < xs:
        n4 += 1
    elif y > xy:
        n2 += 1
    else:
        n3 += 1
mx = max(n1,n2,n3,n4)
print(mx)
if n1 == mx:
    print(xs+1,xy)
    
elif n2 == mx:
    print(xs,xy+1)
elif n3 == mx:
    print(xs,xy-1)
else:
    print(xs-1,xy)