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
#Codeforces Round #608 (Div. 2)
#problem_c
up, down, left, right=0,0,0,0
n , sX, sY= tuple(map(int, input().split()))
for i in range(n):
    loc = tuple(map(int, input().split()))
    if loc[0]<sX: left+=1
    elif loc[0]>sX: right+=1
    if loc[1]>sY: up+=1
    elif loc[1]<sY: down+=1

tent_loc=[sX, sY]
a = max(up, down, left, right)
if a==up:   tent_loc[1]+=1
elif a==down: tent_loc[1]-=1
elif a==left: tent_loc[0]-=1
else: tent_loc[0]+=1

print(a)
print(tent_loc[0], tent_loc[1])