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
a,sx,sy = map(int,input().split())
n, s, w, e = 0, 0, 0, 0
for i in range(a):
    x,y = map(int,input().split())
    if x > sx and y > sy:
        n += 1
        e += 1
    elif x > sx and y < sy:
        s += 1
        e += 1
    elif x < sx and y < sy:
        s += 1
        w += 1
    elif x < sx and y > sy:
        n += 1
        w += 1
    elif x == sx and y > sy:
        n += 1
    elif x == sx and y < sy:
        s += 1
    elif y == sy and x > sx:
        e += 1
    elif y == sy and x < sx:
        w += 1
direc_list = [n,s,w,e]
num_ans = max(direc_list)
print(num_ans)
if direc_list.index(num_ans) == 0:
    print("{} {}".format(sx,sy+1))
elif direc_list.index(num_ans) == 1:
    print("{} {}".format(sx,sy-1))
elif direc_list.index(num_ans) == 2:
    print("{} {}".format(sx-1,sy))
elif direc_list.index(num_ans) == 3:
    print("{} {}".format(sx+1,sy))
