#include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<> n; int mod = 1000000007; vector a(n); for (int i=0; i> a[i]; for (int i=0; i