#include "helper.h"

constexpr int kMaxX = 1'000'000'000;

int main(int argc, char* argv[]) {
    registerGen(argc, argv, 1);

    int n = opt<int>("n");
    int inside = opt<int>("inside");
    int g = opt<int>("g");

    auto poly = random_polygon(n - inside, kMaxX);
    vector<vect<ll>> inside_points;
    while (inside_points.size() < inside) {
        auto pt = random_point(-kMaxX, kMaxX);
        ll s1 = 0;
        ll s2 = 0;
        for (int i = 0; i < (int)poly.size(); i++) {
            s1 += abs((poly[i] - pt) ^ (poly[(i + 1) % (int)poly.size()] - pt));
            s2 += (poly[i] - pt) ^ (poly[(i + 1) % (int)poly.size()] - pt);
        }
        if (s1 == abs(s2)) {
            inside_points.emplace_back(pt);
        }
    }
    for (const auto& pt : inside_points) {
        poly.emplace_back(pt);
    }
    shuffle(poly.begin(), poly.end());
    println(n, g);
    for (int i = 0; i < n; i++) {
        println(poly[i].x, poly[i].y);
    }

    return 0;
}