/**
 *  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 = 1e6;

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

void sieve(){
  p.pb(2);
  for (Long i = 3;i <= len;i += 2){
    if (mark[i]==false){
      p.pb(i);
      for (Long 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 = 2;i < 101;i++){
//    int cnt = 0;
//    for (int j = 0;j < n;j++){
//      if (a[j] % i == 0)cnt++;
//    }
//    if (cnt > 1){
//      ans = "setwise coprime";
//      break;
//    }
//  }
  vector <int> cnt(N+1, 0);
  vector <int> m(N+1, 0);
  for (int i = 0;i < n;i++){
    if (m[a[i]]==0){
      m[a[i]] = 1;
      cnt[a[i]]++;
      if (cnt[a[i]] > 1 && a[i] > 1){
        ans = "setwise coprime";
        break;
      }
      for (int j = 2;j*j <= a[i];j++){
        if (a[i] % j == 0){
          m[j]++;
          if (j*j != a[i])m[a[i]/j]++;
          if (m[j] > 1 || m[a[i]/j] > 1){
            ans = "setwise coprime";
            break;
          }
        }
      }
      if (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;
}
