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 = [int(i) for i in input().split()]
l = []
for i in range(n):
    l.append([int(j) for j in input().split()])
yp = 0
yn = 0
y = 0
xp = 0
xn = 0
x = 0
for i in l:
    if i[1]>sy:
        yp+=1
    elif i[1]<sy:
        yn+=1
    else:
        y+=1
    if i[0]>sx:
        xp+=1
    elif i[0]<sx:
        xn+=1
    else:
        x+=1
if y>x:
    if xn>xp:
        print(xn)
        print(sx-1, sy)
    else:
        print(xp)
        print(sx+1, sy)
else:
    if yn>yp:
        print(yn)
        print(sx, sy-1)
    else:
        print(yp)
        print(sx, sy+1)