/**
 *  winners never quit
**/

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define pp pop_back
#define mp make_pair
#define IO cin.tie(0),cout.tie(0)
#define ISWS ios::sync_with_stdio(0)
typedef long long Long;
void FastIO(){ISWS;IO;}

const int N = 1e5;

const int len = 10000;
vector <int> p;
bool mark[len+1];

void sieve(){
  p.pb(2);
  for (int i = 3;i <= len;i += 2){
    if (mark[i]==false){
      p.pb(i);
      for (int j = i*i;j <= len;j += i+i){
        mark[j] = true;
      }
    }
  }
}

int main()
{
  FastIO();
  int tc, ca = 0;
  sieve();
  int n;
  cin >> n;
  vector <int> a(n);
  for (int i = 0;i < n;i++){
    cin >> a[i];
  }
  string ans = "pairwise coprime";
  for (int i = 0;i < p.size();i++){
    int cnt = 0;
    for (int j = 0;j < n;j++){
      if (a[j] % p[i] == 0)cnt++;
    }
    if (cnt > 1){
      ans = "setwise coprime";
      break;
    }
  }
  int gc = a[0];
  for (int i = 1;i < n;i++){
    gc = __gcd(gc, a[i]);
  }
  if (gc > 1){
    ans = "not coprime";
  }
  cout << ans << '\n';
  return 0;
}
