#include<iostream>
#include<vector>
#include<algorithm>//sort,二分探査など
//#include<bitset>
//#include<cmath>//pow,logなど
//#include<deque>
//#include<functional>
//#include<iterator>
//#include<map>
#include<numeric>//gcd,lcm
//#include<queue>
//#include<set>
//#include<stack>
//#include<string>
//#include<utility>//pair

//QCFium法
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

//浮動小数点処理高速化
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;
using i64 = int64_t;
using f80 = __float80;
using u64 = uint_fast64_t;

constexpr i64 INF = 1010000000000000017LL;
constexpr u64 MOD = 1000000007LL;
constexpr f80 PI = 3.14159265358979323846;

#define _overload3(_1,_2,_3,name,...) name
#define repi(i,start,end) for(int i=(int)(start);i<(int)(end);++i)
#define _rep(i,n) repi(i,0,n)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define rrep(i,start,end) for(int i=(int)(start);i>(int)(end);--i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()

#define v(T) vector<T>
#define vv(T) v(v(T))
#define vvv(T) v(v(v(T)))
typedef v(int) vi;

#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}

template<typename T> ostream &operator<<(ostream &os, const vector< T > &v){
  rep(i,v.size()) os << v[i] << (i + 1 != v.size() ? " " : "");
  return os;
}
template<typename T> istream &operator>>(istream &is, vector< T > &v){
  for(T &in : v) is >> in;
  return is;
}

void Main()
{
  int N;
  cin >> N;
  bool flagP = true;
  bool flagS = false;

  vector<int> A(N);
  cin >> A;

  int gcdx = A[0];
  rep(i, 1, N) {
    gcdx = __gcd(gcdx, A[i]);
  }
  if(gcdx==1) {
    flagS = true;
  }

  vector<int> prime(1000001, 1);
  for(int i = 2; i <= 1000; i++) {
    if(prime[i] == 1) {
      int x = i;
      while(x <= 1000000){
        prime[x] = i;
        x += i;
      }
    }
  }

  vector<bool> elatos(1000001, false);

  rep(i,N){
    int x = A[i];
    while(x > 1){
      if(elatos[prime[x]]) {
        flagP = false;
        break;
      }
      elatos[prime[x]] = true;
      int y = prime[x];
      while(x % y == 0){
        x /= y;
      }
    }
    if(flagP == false) {
      break;
    }
  }

  if(flagP) {
    cout << "pairwise coprime\n";
    return;
  }

  if(flagS) {
    cout << "setwise coprime\n";
    return;
  }

  cout << "not coprime\n";
}

int main()
{
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
//  cout << fixed << setprecision(15);
  Main();
}