#include <bits/stdc++.h>
using namespace std;

constexpr int N = 500;

struct Limits {
    int max_n = N;
    int max_m = N;
    bool allow_right = true;
    bool allow_down = true;
    bool allow_up = true;
};

const vector<Limits> LIMITS{
    /* 0: */ Limits{},
    /* 1: */ Limits{.max_n = 50, .max_m = 50},
    /* 2: */ Limits{.allow_down = false, .allow_up = false},
    /* 3: */ Limits{.allow_right = false},
    /* 4: */ Limits{.allow_up = false},
    /* 5: */ Limits{},
};
