#include using namespace std; using ll = long long; template struct BIT { private: vector bit; int N; T _sum(int r){ r++; T res = 0; while(r > 0) res += bit[r-1], r -= r & -r; return res; } public: BIT (int n){ N = n; bit.resize(N);} BIT (vector &a) : BIT(a.size()) { for (int i=0; i> N >> Q >> x; BIT tc(2e5+1), ts(2e5+1); for (int i=0; i> x; tc.add(x, 1); ts.add(x, x); } while(Q--){ cin >> t; if (t == 1){ cin >> x; tc.add(x, 1); ts.add(x, x); } else if (t == 2){ cin >> x >> y; f=1; cout << tc.sum(x, y) << " " << ts.sum(x, y) << endl; } else{ cin >> x; } } if (!f) cout << "Not Found!" << endl; return 0; }