#include "bits/stdc++.h" #define int long long #define dick vector #define full(a) a.begin(), a.end() using namespace std; using vi = vector; using vvi = vector; using pii = pair; #define V vector #define Vi = V #define all(a) a.begin(), a.end() int len(int n) { return log10(n)+1; } bool solveV() { int n, a, b; cin >> n >> a >> b; cout << len(n) << ' ' << len(b) << ' ' << len(a) << '\n'; if(n != a*b) return false; if(len(a) != len(b) || len(n) != len(a)*2) return false; if(a%10 == 0 && b % 10 == 0) return false; array n_d = {0}, a_d = {0}; while(n) { n_d[n%10]++; n/= 10; } while(a) { a_d[a%10]++; a/=10; } while(b) { a_d[b%10]++; b/=10; } for(int i=0; i<10; i++) if(a_d[i] != n_d[i]) return false; return true; } double dist(int x, int y) { return sqrt(x*x*1.0 + y*y + 0.0); } void solveA() { vector> a(3); for(int i = 0; i<3; i++) { cin>>a[i].first>>a[i].second; } double mn = INT_MAX, mi = -1; for(int i = 0; i<3; i++) { pii other1 = a[(i+1) % 3]; pii other2= a[(i+2) % 3]; if(dist(other1.first - a[i].first, other2.second - a[i].second) < mn) { mn = dist(other1.first - a[i].first, other2.second - a[i].second); mi = i; } if(dist(other2.first - a[i].first, other1.second - a[i].second) < mn) { mn = dist(other2.first - a[i].first, other1.second - a[i].second); mi = i; } } cout<>n>>q; dick a(n); for(int i =0 ;i < n ;i ++){ cin>>a[i]; } dick b(n); dick c(n); for(int i = 1;i < n ;i ++){ if( a[i] < a[i-1] )b[i] =-1; } for(int i = 1 ;i < n;i++){ c[i] = c[i- 1] + b[i]; } while(q--){ int r, l; cin>>r>> l; r--;l --; if(c[r] - c[l] != 0 ){ cout<< "NO\n"; } else cout<< "YES\n"; } return; } signed main() { mv(); return 0; }