#include #include using namespace std; using namespace atcoder; #define rep(i, n) for(int i=0;i<(n);++i) #define rep1(i, n) for(int i=1;i<=(n);i++) #define ll long long using mint = modint998244353; using P = pair; using lb = long double; using T = tuple; #ifdef LOCAL # include # define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define dbg(...) (static_cast(0)) #endif int main() { int n, q, l_0; cin >> n >> q >> l_0; vector a(n); rep(i,n) cin >> a[i]; vector L(q+1); L[0] = l_0; fenwick_tree cnt(2e5+5); fenwick_tree sum(2e5+5); int c = 0; rep(i,n) { cnt.add(a[i], 1); sum.add(a[i], a[i]); } for(int i=1;i<=q;i++) { int t; cin >> t; if(t==1) { int l; cin >> l; cnt.add(l, 1); sum.add(l,l); } else if(t==2) { int l, r; cin >> l >> r; cout << cnt.sum(l,r+1) << " " << sum.sum(l,r+1) << endl; c++; } else{ int m; cin >> m; } } if(c==0) { cout << "Not Found!" << endl; } return 0; }