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 i; int la[]=new int[n]; int ln[]=new int[n]; int h[]=new int[n]; int p[]=new int[n]; for(i = 0; i < n; i++){ la[i] = in.nextInt(); ln[i] = in.nextInt(); h[i]= in.nextInt(); p[i] = in.nextInt(); } sort(la,ln,p,h); int tp=0,lat=0,lnt=0; i=0; while(i pivot) j--; if (i <= j) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; temp = la[i]; la[i] = la[j]; la[j] = temp; temp = ln[i]; ln[i] = ln[j]; ln[j] = temp; temp = p[i]; p[i] = p[j]; p[j] = temp; i++; j--; } } if (low < j) quickSort(la,ln,p,arr, low, j); if (i < high) quickSort(la,ln,p,arr, i, high); } }