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
t,n,m = map(int,input().split())
count = [0 for j in range(8)]
ans = [(n+1,m),(n,m+1),(n,m-1),(n-1,m)]
for i in range(t):
    a,b = map(int,input().split())
    if(a>n):
        count[0]+=1
    if(b>m):
        count[1]+=1
    if(b<m):
        count[2]+=1
    if(a<n):
        count[3]+=1
maxi = max(count)
print(maxi)
print(*ans[count.index(maxi)])