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
# -*- coding: utf-8 -*-

import sys

def solve():
    n, sx, sy = map(int, sys.stdin.readline().strip().split())
    n1 = (sx + 1, sy)
    n2 = (sx - 1, sy)
    n3 = (sx, sy + 1)
    n4 = (sx, sy - 1)

    hm = {n1: 0, n2: 0, n3: 0, n4: 0}
    for _ in xrange(n):
        home = map(int, sys.stdin.readline().strip().split())

        x, y = home
        if x == sx:
            if y > sy:
                hm[n3] += 1
            else:
                # y < sy
                hm[n4] += 1
        elif x > sx:
            if y == sy:
                hm[n1] += 1
            elif y < sy:
                hm[n1] += 1
                hm[n4] += 1
            else:
                hm[n1] += 1
                hm[n3] += 1
        else:
            # x < sx
            if y == sy:
                hm[n2] += 1
            elif y < sy:
                hm[n2] += 1
                hm[n4] += 1
            else:
                hm[n2] += 1
                hm[n3] += 1

    r = list(reversed(
        sorted(hm.items(), key=lambda x: x[1])
    ))[0]
    # print(r)
    sys.stdout.write('%s\n' % r[1])
    sys.stdout.write('%s %s\n' % (r[0][0], r[0][1]))

solve()
