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
def solve(n,schX,schY,houses) :
    up = 0
    down = 0
    left = 0
    right = 0
    
    for x,y in houses :
        if x > schX :
            right += 1
        elif x < schX :
            left += 1
        
        if y > schY :
            up += 1
        elif y < schY :
            down += 1
    
    if up >= down and up >= left and up >= right :
        print (up)
        print (schX , schY + 1)
    
    elif down >= up and down >= left and down >= right :
        print (down)
        print (schX,schY - 1)
    
    elif left >= up and left >= down and left >= right :
        print (left)
        print (schX-1,schY)
    else :
        print (right)
        print (schX+1,schY)


times, schX,schY = list(map(int,input().split()))
loc = []
for _ in range(times) :
    loc.append(list(map(int,input().split())))
solve(times,schX,schY,loc)
    