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