#include <iostream>

constexpr int N = 250005;

int type, n;

struct node {
    int l, r;
    unsigned long long tag1, tag2, sum;
    node(): l(0), r(0), tag1(0), tag2(1), sum(0) {}
} tree[10000005];
int tot;
struct node2 {
    int rt;
    unsigned long long tag1, tag2;
    node2(): rt(0), tag1(0), tag2(1) {}
} tree2[N << 2];

void pushup1(int x) {
    tree[x].sum = tree[tree[x].l].sum + tree[tree[x].r].sum;
}
void addtag1(int x, int l, int r, unsigned long long k, bool opt) {
    if (opt) {
        tree[x].sum *= k;
        tree[x].tag1 *= k;
        tree[x].tag2 *= k;
    } else {
        tree[x].sum += k * (r - l + 1);
        tree[x].tag1 += k;
    }
}
void pushdown1(int x, int l, int r) {
    int mid = (l + r) >> 1;
    addtag1(tree[x].l, l, mid, tree[x].tag2, 1);
    addtag1(tree[x].l, l, mid, tree[x].tag1, 0);
    addtag1(tree[x].r, mid + 1, r, tree[x].tag2, 1);
    addtag1(tree[x].r, mid + 1, r, tree[x].tag1, 0);
    tree[x].tag2 = 1;
    tree[x].tag1 = 0;
}
void build1(int &x, int l, int r) {
    x = ++tot;
    if (l == r) return;
    int mid = (l + r) >> 1;
    build1(tree[x].l, l, mid);
    build1(tree[x].r, mid + 1, r);
}
void update1(int x, int l, int r, int L, int R, unsigned long long k, bool opt) {
    if (L <= l && r <= R) {
        addtag1(x, l, r, k, opt);
        return;
    }
    pushdown1(x, l, r);
    int mid = (l + r) >> 1;
    if (L <= mid) update1(tree[x].l, l, mid, L, R, k, opt);
    if (R > mid) update1(tree[x].r, mid + 1, r, L, R, k, opt);
    pushup1(x);
}
unsigned long long query1(int x, int l, int r, int L, int R) {
    if (L <= l && r <= R) return tree[x].val;
    pushdown1(x, l, r);
    unsigned long long ans = 0;
    if (L <= mid) ans += query1(tree[x].l, l, mid, L, R);
    if (R > mid) ans += query1(tree[x].r, mid + 1, r, L, R);
    pushup1(x);
    return ans;
}

void pushdown2(int x) {
}
void build2(int x, int l, int r) {
    build1(tree2[x].rt, l, r);
    if (l == r) return;
    int mid = (l + r) >> 1;
    build2(x << 1, l, mid);
    build2(x << 1 | 1, mid + 1, r);
}
void update2(int x, int l, int r, int L, int R, int L2, int R2, unsigned long long k, bool opt) {
    if (L <= l && r <= R) {
    }
}

int main() {
    std::ios::sync_with_stdio(false), std::cin.tie(nullptr);
    std::cin >> type >> n;
}
