import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int W = sc.nextInt(); int H = sc.nextInt(); int N = sc.nextInt(); Set a = new HashSet<>(); Set b = new HashSet<>(); for(int i=0;i