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
#code
import sys
import math as mt
input=sys.stdin.buffer.readline

#t=int(input())
t=1
for __ in range(t):
    #n=int(input)        
    #l=list(map(int,input().split()))  
    n,sx,sy=map(int,input().split())            
    p1x,p1y=sx+1,sy
    p2x,p2y=sx-1,sy
    p3x,p3y=sx,sy+1
    p4x,p4y=sx,sy-1
    p1,p2,p3,p4=0,0,0,0
    for i in range(n): 
        x,y=map(int,input().split())
        dist=abs(x-sx)+abs(y-sy)
        if dist==(abs(x-p1x)+abs(y-p1y)+1):
            p1+=1
        if dist==(abs(x-p2x)+abs(y-p2y)+1):
            p2+=1
        if dist==(abs(x-p3x)+abs(y-p3y)+1):
            p3+=1
        if dist==(abs(x-p4x)+abs(y-p4y)+1):
            p4+=1
    ch=0        
    if p1==max(p1,p2,p3,p4) and ch==0:
        print(p1)
        print(p1x,p1y)
        ch=1
    if p2==max(p1,p2,p3,p4) and ch==0:
        ch=1
        print(p2)
        print(p2x,p2y)
    if p3==max(p1,p2,p3,p4) and ch==0:
        ch=1
        print(p3)
        print(p3x,p3y)
    if p4==max(p1,p2,p3,p4) and ch==0:
        ch=1
        print(p4)
        print(p4x,p4y)    
                    
   		   		 			 		  		 	 		 	 	