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, input().split())
quad1,quad2,quad3,quad4=0,0,0,0
for i in range(n):
    x,y=map(int, input().split())
    if x<=sx:
        if y >= sy:
            quad1+=1
        if y <= sy:
            quad4+=1
    if x >= sx:
        if y >= sy:
            quad2+=1
        if y <= sy:
            quad3+=1
p12 = quad1+quad2
p23 = quad2+quad3
p34 = quad3+quad4
p14 = quad4+quad1
mx = max(p12,p23,p34,p14)
print(mx)
if mx == p12:
    print(sx,sy+1)
elif mx == p23:
    print(sx+1,sy)
elif mx == p34:
    print(sx,sy-1)
else:
    print(sx-1,sy)