#include "testlib.h"
#include <string>
#include <iostream>

using namespace std;

const int maxc[7] = {10, 1000, 5000, 100'000, 1'000'000, 10'000'000, 50'000'000};

const int maxn[7] = {10, 1000, 5000, 100'000, 1'000'000, 10'000'000, 50'000'000};

int main(int argc, char* argv[]) {
	registerGen(argc, argv, 1);
	int group = opt<int>("group") - 1;
	string mode = opt<string>("mode");
	if (mode == "max") {
		cout << maxn[group] << " " << maxc[group] << "\n";
		return 0;
	}
	if (mode == "maxn_minc") {
		cout << maxn[group] << " " << 1 << "\n";
		return 0;
	}
	if (mode == "minn_maxc") {
		cout << 1 << " " << maxc[group] << "\n";
		return 0;
	}
	if (mode == "rand") {
		int w = opt<int>("w");
		cout << rnd.wnext(maxn[group], w) + 1 << " ";
		cout << rnd.wnext(maxc[group], w) + 1 << "\n";
		return 0;
	}
	if (mode == "custom") {
		int n = opt<int>("n");
		int c = opt<int>("c");
		cout << n << " " << c << "\n";
	}
	return 0;
}
