Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<deque>
#include<utility>
#include<tuple>
#include<bitset>
#include<complex>
// #include<ratio>
#include<algorithm>
#include<numeric>
// #include<limits>
// #include<chrono>
// #include<random>
// #include<regex>
// #include<functional>
#include<boost/multiprecision/cpp_int.hpp>
// <iostream>
using std::cin;
using std::cout;
using std::clog;
using std::cerr;
using std::endl;
// <ios>
using std::ios_base;
// <string>
using std::string;
using std::to_string;
using std::stoi;
using std::stol;
// <vector>
using std::vector;
// <map>
using std::map;
// <set>
using std::set;
// <queue>
using std::priority_queue;
using std::queue;
// <stack>
using std::stack;
// <deque>
using std::deque;
// <utility>
using std::pair;
// <tuple>
using std::tuple;
// <bitset>
using std::bitset;
// <complex>
using std::complex;
using std::real;
using std::imag;
using std::sin;
using std::cos;
using std::tan;
using std::asin;
using std::acos;
using std::atan;
using std::sinh;
using std::cosh;
using std::tanh;
using std::asinh;
using std::acosh;
using std::atanh;
using std::abs;
using std::pow;
using std::sqrt;
using std::exp;
using std::log;
using std::log10;
using std::polar;
using std::norm;
// <ratio>
// using std::ratio;
// <algorithm>
using std::all_of;
using std::any_of;
using std::none_of;
using std::find;
using std::count;
using std::swap;
using std::fill;
using std::unique;
using std::reverse;
using std::rotate;
using std::shuffle;
using std::sort;
using std::stable_sort;
using std::partial_sort;
using std::nth_element;
using std::lower_bound;
using std::upper_bound;
using std::equal_range;
using std::binary_search;
using std::set_union;
using std::set_intersection;
using std::set_difference;
using std::min;
using std::max;
using std::minmax; // value
using std::min_element;
using std::max_element;
using std::minmax_element; // pointer
using std::next_permutation;
using std::prev_permutation;
// <numeric>
using std::accumulate;
// <limits>
// using std::numeric_limits;
// <chrono>
// using std::chrono::system_clock;
// <random>
// using std::mt19937_64;
// <regex>
// using std::regex_match;
// <functional>
// using std::function;
// <boost/multiprecision/cpp_int.hpp>
using boost::multiprecision::cpp_int;
using ll=long long;
using ld=long double;
using ull=unsigned long long;
// using vi=vector<int>;
// using vll=vector<ll>;
// using vs=vector<string>;
// using msi=map<string,int>;
// using si=set<int>;
// using ss=set<string>;
// using pii=pair<int,int>;
// using tiii=tuple<int,int,int>;
// using pqi=priority_queue<int>;
// using pqpii=priority_queue<pii>;
// using pqtiii=priority_queue<tiii>;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define rep(I,N) up(I,0,N-1)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define lb lower_bound
#define ub upper_bound
#define rs resize
#define np next_permutation
#define pp prev_permutation
#define rev reverse
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<"\n";}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<"\n";}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<"\n";}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<"\n";}
inline void                                              out(ld p){printf("%.12Lf\n",p);}
template<class T>inline void outml(T p){for_each(all(p),out<decltype(p[0])>);}//ml=multi line
template<class T>inline void outol(T V){auto n=V.size();rep(i,n)cout<<V[i]<<" \n"[i==n-1];}//ol=one line
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
class math{
private:
  long MOD;
public:
  math(){
    MOD=1000000007;
  }
  math(long mod){
    MOD=mod;
  }
  template<class T>inline
  T mod_add(T a,T b){
    a%=MOD;
    a+=b;
    if(a>=MOD)a-=MOD;
    return a;
  }
  template<class T>inline
  T mod_sub(T a,T b){
    a%=MOD;
    a-=b;
    if(a<0)a+=MOD;
    return a;
  }
  template<class T>inline
  T mod_mul(T a,T b){
    a%=MOD;
    a*=b;
    if(a>=MOD)a%=MOD;
    return a;
  }
  template<class T>inline
  T mod_div(T a,T b){
    a%=MOD;
    a/=b;
    return a;
  }
  template<class T>inline
  T mod_pow(T a,T n){
    T r=1;
    while(n)r=r*((n%2)?a:1)%MOD,a=a*a%MOD,n>>=1;
    return r;
  }
  template<class T>inline
  T nCr(T n,T r){
    if(n<0||r<0||r>n)return 0;
    T p=1,q=1;
    r=min(r,n-r);
    for(T i=1;i<=r;i++,n--)p=p*n%MOD,q=q*i%MOD;
    return p*mod_pow(q,MOD-2)%MOD;
  }
  template<class T>inline
  T nHr(T n,T r){return (n==0&&r==0)?1:nCr(n+r-1,r);}
  template<class T>inline
  map<T,T> prime_decomp(T n){
    map<T,T> m;
    for(T i=2;i*i<=n;i++){
      while(n%i==0){
        m[i]++;
        n/=i;
      }
    }
    if(n>1)m[n]++;
    return m;
  }
  template<class T>inline
  bool is_prime(T n) {
    if(n==2)return true;
    if(n<2||n%2==0)return false;
    for(T i=3;i*i<=n;i+=2){
      if(n%i==0)return false;
    }
    return true;
  }
  template<class T>inline
  vector<T> divisor(T n){
    vector<T>res;
    for(T i=1;i*i<=n;i++){
      if(n%i==0){
        res.push_back(i);
        if(i!=n/i)res.push_back(n/i);
      }
    }
    return res;
  }
  template<class T>inline T calc_gcd(T a,T b){if(b==0)return a;return calc_gcd(b,a%b);}
  template<class T>inline T calc_lcm(T a,T b){return a*b/calc_gcd(a,b);}
  template<class T>inline
  T fact(T n){
    T res=1;
    for(T i=1;i<=n;i++)res*=i;
    return res;
  }
  template<class T>inline
  T sum(T n){return n*(n+1)/2;}
  template<class T>inline
  bool ccw(T ax,T ay,T bx,T by,T cx,T cy,T dx,T dy){
    T ta = (cx - dx) * (ay - cy) + (cy - dy) * (cx - ax);
    T tb = (cx - dx) * (by - cy) + (cy - dy) * (cx - bx);
    T tc = (ax - bx) * (cy - ay) + (ay - by) * (ax - cx);
    T td = (ax - bx) * (dy - ay) + (ay - by) * (ax - dx);
    return tc * td < 0 && ta * tb < 0;// 端点を含まない場合
    // return tc * td <= 0 && ta * tb <= 0; // 端点を含む場合
  }
  template<class T>inline
  double dot(T a, T b){
    return real(a) * real(b) + imag(a) * imag(b);
  }
  template<class T>inline
  double cross(T a, T b){
    return real(a) * imag(b) - imag(a) * real(b);
  }
  template<class T>inline
  double distance(T a, T b, T c){
     if(dot(b - a, c - a) <= 0.0) return abs(c - a);
     if(dot(a - b, c - b) <= 0.0) return abs(c - b);
     return abs(cross(b - a, c - a)) / abs(b - a);
   }
}math;
ll N,gcd;
bool f,ff;
inline void solve(void){
  in(N);
  vector<ll>A(N);
  ins(A);
  vector<int>right(N+1,0);
  for (int i = N-1; i >= 0; --i) right[i] = math.calc_gcd(right[i+1], a[i]);
  up(i,1,N-1)if(right[i]!=1){
    ff=true;
    break;
  }
  gcd=A[0];
  up(i,1,N-1){
    gcd=math.calc_gcd(gcd,A[i]);
    if(gcd!=1)f=true;
  }
  if(gcd==1&&!ff)out("pairwise coprime");
  else if(gcd==1&f)out("setwise coprime");
  else out("not coprime");
}
int main(void){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:22:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   22 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.