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 solve():
    n,sx,sy = [int(x) for x in input().split()]
    l = 0
    r = 0
    u = 0
    d = 0
    for p in range(n):
        px,py = [int(x) for x in input().split()]
        if py>sy:
            u+=1
        if py <sy:
            d+=1
        if px<sx:
            l+=1
        if px>sx:
            r+=1
    m = max(l,r,u,d)
    print(m)
    if l==m:
        print(sx-1,sy)
        return
    if r ==m:
        print(sx+1,sy)
        return
    if u==m:
        print(sx,sy+1)
        return
    if d==m:
        print(sx,sy-1)
        return
import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
solve()
