#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << first << ',' << second << ')'
constexpr ll MOD = 1000000007;
//constexpr ll MOD = 998244353;
ll INF = 1001001001001001001;
long double EPS = 1e-9;
long double PI = 3.141592653589793238;
template <typename T>
void remove(std::vector<T> &vector, unsigned int index)
{
   vector.erase(vector.begin() + index);
}

using Graph = vector<vector<pair<ll,ll>>>;

// MOD確認

ll N;
ll A[1000010];

int main(){
   cin >> N;
   rep(i,N) cin >> A[i];
   map<ll,ll> mp;
   rep(i,N){
      ll n = A[i];
      for(ll j = 2;j * j <= n;j++){
         if(n % j == 0) mp[j]++;
         while(n % j == 0){
            n /= j;
         }
      }
      if(n != 1) mp[n]++;
   }
   bool flag = 1;
   for(auto itr = mp.begin();itr != mp.end();itr++){
      if(itr ->second > 1) flag = 0;
   }
   if(flag) cout << "pairwise coprime" << endl;
   else{
      ll G = __gcd(A[0],A[1]);
      rep(i,N-1){
         G = __gcd(G,A[i+1]);
      }
      if(G == 1) cout << "setwise coprime" << endl;
      else cout << "not coprime" << endl;
   }
}