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=[]
b=[]
xx=[]
ans=0
ansx=0
ansy=0

def main():
    ans=[0,0,0,0] #左、上、右、下
    n,s1,s2=[int(n) for n in input().split()]

    for i in range(n):
        a1,a2=[int(n) for n in input().split()]
        if(a1<s1):
            ans[0]+=1
        if(a1>s1):
            ans[2]+=1
        if(a2<s2):
            ans[3]+=1
        if(a2>s2):
            ans[1]+=1

    dx=[-1,0,1,0]
    dy=[0,1,0,-1]

    res=0
    for i in range(0,4):
        if(res<ans[i]):
            res=ans[i]
            ansx=s1+dx[i]
            ansy=s2+dy[i]

    print(res)
    print("{} {}".format(ansx,ansy))

main()