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=map(int,input().split())
x1,y1=10**9,10**9
x2,y2=10**9,10**9
x3,y3=10**9,10**9
x4,y4=10**9,10**9
u,d,r,l=0,0,0,0
for i in range(n):
    x,y=map(int,input().split())
    if(x<=sx and y>=sy):
        u+=1
        l+=1
        x1=min(x1,x)
        y1=min(y1,y)
        x2=min(x2,sx)
        y2=min(y2,y)
        x3=min(x3,sx)
        y3=min(y3,sy)
        x4=min(x4,x)
        y4=min(y4,sy)
    elif(x>=sx and y>=sy):
        u+=1
        r+=1
        x1=min(x1,sx)
        y1=min(y1,y)
        x2=min(x2,x)
        y2=min(y2,y)
        x3=min(x3,x)
        y3=min(y3,sy)
        x4=min(x4,sx)
        y4=min(y4,sy)
    elif(x>=sx and y<=sy):
        d+=1
        r+=1
        x1=min(x1,sx)
        y1=min(y1,sy)
        x2=min(x2,x)
        y2=min(y2,sy)
        x3=min(x3,x)
        y3=min(y3,y)
        x4=min(x4,sx)
        y4=min(y4,y)
    elif(x<=sx and y<=sy):
        l+=1
        d+=1
        x1=min(x1,x)
        y1=min(y1,sy)
        x2=min(x2,sx)
        y2=min(y2,sy)
        x3=min(x3,sx)
        y3=min(y3,y)
        x4=min(x4,x)
        y4=min(y4,y)
m=max(u,d,r,l)
print(m)
if(m==u):
    
    print(sx,sy+1)
elif(m==d):
    print(sx,sy-1)
elif(m==r):
    print(sx+1,sy)
else:
    print(sx-1,sy)