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()]
l = []
for i in range(n):
    l.append([int(j) for j in input().split()])
q1 = 0
q2 = 0
q3 = 0
q4 = 0
for i in l:
    if i[0]<=sx and i[1]>=sy:
        q1+=1
    if i[0]>=sx and i[1]>=sy:
        q2+=1
    if i[0]>=sx and i[1]<=sy:
        q3+=1
    if i[0]<=sx and i[1]<=sy:
        q4+=1
x1 = 0
y1 = 0
for i in l:
    if i[1]==sy:
        x1+=1
    if i[0]==sx:
        y1+=1
temp = max(q1, q2, q3, q4)
if temp==q1:
    x = 0
    y = 0
    for i in l:
        if i[0]==sx and i[1]>=sy:
            y+=1
        if i[1]==sy and i[0]<=sx:
            x+=1
    if(x>y):
        print(q1+q4-y1-x)
        print(sx-1,sy)
    else:
        print(q1-x1+q2-y)
        print(sx,sy+1)
elif temp==q2:
    x = 0
    y = 0
    for i in l:
        if i[0]==sx and i[1]>=sy:
            y+=1
        if i[1]==sy and i[0]>=sx:
            x+=1
    if(x>y):
        print(q2-y1+q3-x)
        print(sx+1,sy)
    else:
        print(q2-x1+q1-y)
        print(sx,sy+1)
elif temp==q3:
    x = 0
    y = 0
    for i in l:
        if i[0]==sx and i[1]<=sy:
            y+=1
        if i[1]==sy and i[0]>=sx:
            x+=1
    if(x>y):
        print(q3-y1+q2-x)
        print(sx+1,sy)
    else:
        print(q3-x1+q4-y)
        print(sx,sy-1)
else:
    x = 0
    y = 0
    for i in l:
        if i[0]==sx and i[1]<=sy:
            y+=1
        if i[1]==sy and i[0]<=sx:
            x+=1
    if(x>y):
        print(q4-y1+q1-x)
        print(sx-1,sy)
    else:
        print(q4-x1+q3-y)
        print(sx,sy-1)