import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Scanner; import java.util.Set; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int w=scanner.nextInt(); int h=scanner.nextInt(); int n=scanner.nextInt(); Mapmap=new HashMap<>(); Setset=new HashSet<>(); for(int i=0;i