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
def main():
    n, sx, sy = map(int, input().split())
    a = []
    cnt1 = cnt2 = cnt3 = cnt4 = 0
    ny34 = ny12 = nx23 = nx14 = 0
    for _ in range(n):
        x, y = map(int, input().split())
        x -= sx
        y -= sy
        if x > 0:
            if y > 0:
                cnt1 += 1
            if y < 0:
                cnt4 += 1
        if x < 0:
            if y > 0:
                cnt2 += 1
            if y < 0:
                cnt3 += 1
        if x == 0:
            if y > 0:
                ny12 += 1
            else:
                ny34 += 1
        if y == 0:
            if x > 0:
                nx14 += 1
            else:
                nx23 += 1

    if cnt1 + cnt4 + nx14 == max(cnt1 + cnt4 + nx14, cnt1 + cnt2 + ny12, cnt2 + cnt3 + nx23, cnt3 + cnt4 + ny34):
        print(cnt1 + cnt4 + nx14)
        print(sx + 1, sy)
    elif cnt1 + cnt2 + ny12 == max(cnt1 + cnt4 + nx14, cnt1 + cnt2 + ny12, cnt2 + cnt3 + nx23, cnt3 + cnt4 + ny34):
        print(cnt1 + cnt2 + ny12)
        print(sx, sy + 1)
    elif cnt3 + cnt2 + nx23 == max(cnt1 + cnt4 + nx14, cnt1 + cnt2 + ny12, cnt2 + cnt3 + nx23, cnt3 + cnt4 + ny34):
        print(cnt3 + cnt2 + nx23)
        print(sx - 1, sy)
    elif cnt3 + cnt4 + ny34 == max(cnt1 + cnt4 + nx14, cnt1 + cnt2 + ny12, cnt2 + cnt3 + nx23, cnt3 + cnt4 + ny34):
        print(cnt3 + cnt4 + ny34)
        print(sx, sy - 1)


main()
