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())
l,r,a,b,e= 0,0,0,0,0
for _ in range(0,n):
    aa,bb = map(int,input().split())
    if aa<sx:
        l += 1
    elif aa>sx:
        r += 1
    elif bb>sy:
        a += 1
    elif bb<sy:
        b += 1
if r>l:
    print(r)
    print(sx+1,sy)
elif r<=l:
    print(l)
    print(max(0,sx-1),sy)
elif a>b:
    print(a)
    print(sx,sy+1)
else:
    print(b)
    print(sx,max(0,sy-1))

