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 = input('').split(' ')
n = int(a[0])
sx = int(a[1])
sy = int(a[2])
xs = []
ys = []
yp = 0
yn = 0
xp = 0
xn = 0

for i in range(n):
    a = input('').split(' ')
    xs.append(int(a[0]))
    ys.append(int(a[1]))
    if(ys[i] > sy):
        yp += 1
    if(ys[i] < sy):
        yn += 1
    if(xs[i] > sx):
        xp += 1
    if(xs[i] < sx):
        xn += 1

m = max(yp,yn,xn,xp)
print(m)
if(m == yp):
    print(str(sx)+' '+str(sy+1))
elif(m == yn):
    print(str(sx)+' '+str(sy-1))
elif(m == xp):
    print(str(sx+1)+' '+str(sy))
elif(m == xn):
    print(str(sx-1)+' '+str(sy))

    