#include "validation.h"
#include <unordered_set>

// Check the grammar of the input files.
// You should also check properties of the input.
// E.g., check that a graph is connected.

#define N_MIN 1LL
#define N_MAX 300'000LL
#define T_MIN 0LL
#define T_MAX 1'000'000'000'000LL
#define X_MIN 0LL
#define X_MAX 1'000'000'000'000LL

int main(int argc, char** argv) {
	InputValidator v(argc, argv);
	int n = v.read_integer("n", N_MIN, N_MAX);
	v.newline();

    std::unordered_set<long long> times;

    do {
        long long t,x;
        t = v.read_integer("t", T_MIN, T_MAX);
        v.space();
        x = v.read_integer("x", X_MIN, X_MAX);
        v.newline();

        v.check(times.count(t) == 0, "Duplicate times");
        times.insert(t);
    } while(--n);
	return 0;
}
