#include using namespace std; using ll = long long; using uint = unsigned int; using ull = unsigned long long; #define rep(i,n) for(int i=0;i=0;i--) #define per1(i,n) for(int i=int(n);i>0;i--) #define all(c) c.begin(),c.end() #define si(x) int(x.size()) #define pb emplace_back #define fs first #define sc second template using V = vector; template using VV = vector>; template void chmax(T& x, U y){if(x void chmin(T& x, U y){if(y void mkuni(V& v){sort(all(v));v.erase(unique(all(v)),v.end());} template int lwb(const V& v, const T& a){return lower_bound(all(v),a) - v.begin();} template ostream& operator<<(ostream& o,const pair &p){ return o<<"("< ostream& operator<<(ostream& o,const vector &vc){ o<<"{"; for(const T& v:vc) o<>= bsf(a); do{ b >>= bsf(b); if(a>b) swap(a,b); b -= a; }while(b); return a<(const Frac& r) const { return r < *this; } bool operator<=(const Frac& r) const { return !(r < *this); } bool operator>=(const Frac& r) const { return !(*this < r); } bool operator==(const Frac& r) const { return x == r.x && y == r.y; } bool operator!=(const Frac& r) const { return !(*this == r); } friend ostream& operator<<(ostream &o,const Frac& x){ return o << x.x << "/" << x.y; } }; int main(){ cin.tie(0); ios::sync_with_stdio(false); //DON'T USE scanf/printf/puts !! cout << fixed << setprecision(20); int N,K; cin >> N >> K; K--; V A(N); rep(i,N) cin >> A[i]; V f(N); f[N-1] = 1; if(N > 2){ V a(N),b(N); // f[1] = x // f[i] = a[i]x + b[i] a[1] = 1; for(int i=2;i