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
import sys
input = sys.stdin.readlines
lines = input()
lines.reverse()
x_plus = 0
top_right = 0
y_plus = 0
top_left = 0
x_min = 0
bottom_left = 0
y_min = 0
bottom_right = 0

n, s_x, s_y = map(int, lines.pop().split())
for i in range(n):
    h_x, h_y = map(int, lines.pop().split())
    if h_x > s_x and h_y == s_y:
        x_plus += 1
    elif h_x > s_x and h_y > s_y:
        top_right += 1
    elif h_x == s_x and h_y > s_y:
        y_plus += 1
    elif h_x < s_x and h_y > s_y:
        top_left += 1
    elif h_x < s_x and h_y == s_y:
        x_min += 1
    elif h_x < s_x and h_y < s_y:
        bottom_left += 1
    elif h_x == s_x and h_y < s_y:
        y_min += 1
    elif h_x > s_x and h_y < s_y:
        bottom_right += 1

right = x_plus + top_right + bottom_right
up = y_plus + top_right + top_left
left = x_min + top_left + bottom_left
down = y_min + bottom_left + bottom_right

most_houses = max(right, up, left, down)
print(most_houses)
if most_houses == right:
    print(s_x + 1, s_y)
elif most_houses == up:
    print(s_x, s_y + 1)
elif most_houses == left:
    print(s_x - 1, s_y)
elif most_houses == down:
    print(s_x, s_y - 1)
