import java.util.*; import java.util.stream.*; import static java.lang.Math.*; 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 sSet=new HashSet<>(); Set kSet=new HashSet<>(); for(int i=0;i