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 sum=0; int[] lat=new int[n]; int[] lon=new int[n]; int[] h=new int[n]; int[] points=new int[n]; for(int a = 0; a < n; a++) { lat[a] = in.nextInt(); lon[a] = in.nextInt(); h[a] = in.nextInt(); points[a] = in.nextInt(); } for(int i=0;i