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,sx,sy=map(int,raw_input().split())

#h=[]
c=[0,0,0,0] # up, down, left, right
cand=[[sx,sy+1],[sx,sy-1],[sx-1,sy],[sx+1,sy]]
for _ in xrange(n):
#    h.append(map(int,raw_input().split()))
    x,y=map(int,raw_input().split())
    if x<sx: c[2]+=1
    if x>sx: c[3]+=1
    if y<sy: c[1]+=1
    if y>sy: c[0]+=1
#    if x==sx:
#        if y<sy: c[1]+=1
#        else: c[0]+=1
#    elif y==sy:
#        if x<sx: c[2]+=1
#        else: c[3]+=1
#    elif x<sx:
#        if 

m=max(c)
idx=c.index(m)
print c[idx]
print str(cand[idx][0])+" "+str(cand[idx][1])
