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(x) for x in input().split()]
student = []
for i in range(n):
    student.append([int(x) for x in input().split()])
a = 0
b = 0
c = 0
d = 0
for i in student:
    x = i[0]
    y = i[1]
    if x < sx:
        a += 1
    if y < sy:
        b += 1
    if x > sx:
        c += 1
    if y > sy:
        d += 1
maxi = max(a, b, c, d)
print(maxi)
a, b, c, d = 0, 0, 0, 0
for i in student:
    x = i[0]
    y = i[1]
    if x < sx:
        a += 1
        if a == maxi:
            print(sx-1, sy)
            break
    if y < sy:
        b += 1
        if b == maxi:
            print(sx, sy-1)
            break
    if x > sx:
        c += 1
        if c == maxi:
            print(sx+1, sy)
            break
    if y > sy:
        d += 1
        if d == maxi:
            print(sx, sy + 1)
            break
