import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //FastScanner scanner=new FastScanner(); PrintWriter out = new PrintWriter(System.out); int gx=scanner.nextInt(); int gy=scanner.nextInt(); int n=scanner.nextInt(); int f=scanner.nextInt(); final int INF=1000000; int[][] d=new int[gx+1][gy+1]; for(int i=0; i<=gx; i++) Arrays.fill(d[i], INF); d[0][0]=0; int[] x=new int[n]; int[] y=new int[n]; int[] c=new int[n]; for(int i=0; i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } }