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(i) for i in input().split()]
xs, xn, xv, xz =0, 0, 0, 0

for i in range(n):
    ux, uy = [int(i) for i in input().split()]
    if (uy - sy)>0:
        xn+=1
    if (uy - sy)<0:
        xs+=1
    if (ux - sx)>0:
        xv+=1
    if (ux - sx)<0:
        xz+=1
for kl in range(1):
    if xn >= max(xn, xs, xv, xz):
        print(xn)
        print(sx, sy + 1)
        break
    if xs >= max(xn, xs, xv, xz):
        print(xs)
        print(sx, sy - 1)
        break
    if xv >= max(xn, xs, xv, xz):
        print(xv)
        print(sx+1, sy)
        break
    if xz >= max(xn, xs, xv, xz):
        print(xz)
        print(sx-1, sy)
        break