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=tuple(map(int,input().split()))
l=[[0,0] for i in range(n)]
for i in range(n):
    l[i][0],l[i][1]=tuple(map(int,input().split()))
t1=0
t2=0
t3=0
t4=0
print(l)
for  i in range(n):
    if(l[i][1]>sy):
        t1+=1
    elif(l[i][1]<sy):
        t2+=1
    else:
        if(l[i][0]>sx):
            t3+=1
        else:
            t4+=1
t=max(t1,t2,t3+max(t1,t2),t4+max(t1,t2))
if(t==t1):
    print(t)
    print(sx,sy+1)
elif(t==t2):
    print(t)
    print(sx,sy-1)
elif(t==t3+max(t1,t2)):
    print(t)
    print(sx+1,sy)
else:
    print(t)
    print(sx-1,sy)