def extract_arguments(fh):
    n, m, k = map(int, fh.readline().strip().split())
    robots = [tuple(map(int, fh.readline().strip().split())) for _ in range(k)]
    return n, m, k, robots

# if __name__ == "__main__":
#     input_path = sys.argv[1]
#     with open(input_path, 'r') as fh:
#     n, m, k, robots = extract_arguments(fh)
#     f(n, m, k, robots)