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
import sys
input=sys.stdin.readline
n,x,y=map(int,input().split())
p=[[x+1,y],[x-1,y],[x,y+1],[x,y-1]]
s=[]
#t=[]
for _ in range(n):
    a,b=map(int,input().split())
    s.append([min(a,x),max(a,x),min(b,y), max(b,y)])
    #t.append([min(b,y),max(b,y)])
m=0
q=-1
for i in range(4):
    a,b=p[i]
    c=0
    for j in range(n):
        if s[j][0]<=a<=s[j][1] and s[j][2]<=b<=s[j][3]:
            #print(i,*p[i],*s[j],*t[j])
            c+=1
    #print(c,a,b)
    if c>m:
        m=c
        q=i
print(m)
print(*p[q])