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
from sys import stdin, stdout
from collections import Counter, defaultdict
pr=stdout.write
raw_input  = stdin.readline
def ni():
    return int(raw_input())


def li():
    return list(map(int,raw_input().split()))


def pn(n):
    stdout.write(str(n)+'\n')


def pa(arr):
    pr(' '.join(map(str,arr))+'\n')

# fast read function for total integer input

def inp():
    # this function returns whole input of
    # space/line seperated integers 
    # Use Ctrl+D to flush stdin.
    return (map(int,stdin.read().split()))
    
range = xrange # not for python 3.0+

# main code

n,sx,sy=li()
c1,c2,c3,c4=0,0,0,0
for i in range(n):
    x,y=li()
    if x>sx:
        c1+=1
    if x<sx:
        c2+=1
    if y>sy:
        c3+=1
    if y<sy:
        c4+=1
mx=max(c1,c2,c3,c4)
pn(mx)
if mx==c1:
    pa([sx+1,sy])
elif mx==c2:
    pa([sx-1,sy])
elif mx==c3:
    pa([sx,sy+1])
else:
    pa([sx,sy-1])
