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
a = list(map(int, input().split()))
a_x= a[1]
a_y = a[2]
up = []
down= []
plus = []
minus = []
ans= []
for i in range(a[0]):
    b = list(map(int, input().split()))
    if b[0]> a[1]:
        plus.append(b)
    elif b[0] < a[1]:
        minus.append(b)
    else:
        plus.append(b)
        minus.append(b)
    if b[1]> a[2]:
        up.append(b)
    elif b[1] < a[2]:
        down.append(b)
    else:
        up.append(b)
        down.append(b)
k = max(len(up), len(down), len(plus), len(minus))
if k == len(up):
    print(len(up))
    ans.append(a_x)
    ans.append(a_y + 1)
elif k == len(down):
    print(len(down))
    ans.append(a_x)
    ans.append(a_y - 1)
elif k == len(plus):
    print(len(plus))
    ans.append(a_x + 1)
    ans.append(a_y)
elif k == len(minus):
    print(len(minus))
    ans.append(a_x - 1)
    ans.append(a_y)
print(*ans)
    