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
# f = open('file.txt', 'r+')
# inp = f.readline
inp = input

n , sx , sy = map( int , inp().strip().split(" ") )

pts = []

for _ in range(n):
    a , b = map( int , inp().split(" ") )

    pts.append( (a , b) )
    
    
top = ( sx , sy+1 )
tpc = 0
for p in pts:
    if p[1] > sy:
        tpc += 1
        
bot = ( sx , sy-1 )
bpc = 0
for p in pts:
    if p[1] < sy:
        bpc += 1
        
        
lef = ( sx+1 , sy )
lpc = 0
for p in pts:
    if p[0] > sx:
        lpc += 1
        
rit = ( sx-1 , sy )
rpc = 0
for p in pts:
    if p[0] < sx:
        rpc += 1
        
apt = [ ( tpc , top ) , ( bpc , bot ) , ( lpc , lef ) ,( rpc , rit ) ]

apt.sort()

ans = apt[-1]

print(ans[0])
print(*ans[1])