import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int x = in.nextInt(); int y = in.nextInt(); int latitude[]= new int[n]; int longitude[]= new int[n]; int height[]= new int[n]; int points[]= new int[n]; for(int a0 = 0; a0 < n; a0++){ latitude[a0] = in.nextInt(); longitude[a0] = in.nextInt(); height[a0] = in.nextInt(); points[a0] = in.nextInt(); } int maxPoints = points[0]; for(int i=1;i