#include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;
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; }

int dx[] = { 0, 1, -1, 0, 1, -1, 1, -1 };  // i<4:4way i<8:8way
int dy[] = { 1, 0, 0, -1, 1, -1, -1, 1 };

const ll mod = 1e9 + 7;
const ll INF = -1 * ((1LL << 63) + 1);
const int inf = -1 * ((1 << 31) + 1);

int cnt[1000006];

int main(void){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  int allgcd = a[0];
  rep(i,n)allgcd = __gcd(allgcd,a[i]);
  if(allgcd > 1){
    cout << "not coprime" << endl;
  }else{
    // 与えられた数をそれぞれ素因数分解していく
    rep(i,n){
      int now = a[i];
      for(ll i=2;i*i<=a[i];i++){
        if(now%i==0){
          while(now%i==0)now/=i;
          cnt[i]++;
        }
      }
      if(now>1)cnt[now]++;
    }
    rep(i,1e6+1){
      if(cnt[i]>1){
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
    cout << "pairwise coprime" << endl;
  }
}