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,x0,y0=list(map(int,input().split()))
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
ans=[]
m=0
y=10**9
for i in range(n):
    if l[i][1]>y0:
        m=m+1
        y=min(y,l[i][1])
ans.append([m,x0,y])
m=0
y=0
for i in range(n):
    if l[i][1]<y0:
        m=m+1
        y=max(y,l[i][1])
ans.append([m,x0,y])
m=0
x=10**9
for i in range(n):
    if l[i][0]>x0:
        m=m+1
        x=min(x,l[i][0])
ans.append([m,x,y0])
m=0
x=0
for i in range(n):
    if l[i][0]<x0:
        m=m+1
        x=max(x,l[i][0])
ans.append([m,x,y0])
ans.sort()
print(ans[-1][0])
print(ans[-1][1],ans[-1][2])