#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
const long long mod = 1e9 + 7;
const long long inf = 0x3f3f3f3f3f3f3f;
long long cnt;
long long prim[N];
long long vis[N];
void init() {
  for (long long i = 2; i < N; i++) {
    if (!vis[i]) {
      prim[++cnt] = i;
    }
    for (long long j = 1; j <= cnt && i * prim[j] < N; j++) {
      vis[i * prim[j]] = 1;
      if (i % prim[j] == 0) break;
    }
  }
}
long long n;
long long num[N], a[N];
long long GCD;
bool flag = 1;
long long gcd(long long x, long long y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
void solve(long long x) {
  if (!vis[x]) {
    num[x]++;
    return;
  }
  for (long long i = 1; i <= cnt; i++) {
    if (x % prim[i] == 0) {
      num[prim[i]]++;
      while (x % prim[i] == 0) x /= prim[i];
      solve(x);
      break;
    }
  }
}
void otpt() {
  if (flag == 1)
    cout << "pairwise coprime" << endl;
  else if (GCD == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
signed main() {
  init();
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  GCD = a[1];
  for (long long i = 1; i <= n; i++) GCD = gcd(GCD, a[i]);
  for (long long i = 1; i <= n; i++) solve(a[i]);
  for (long long i = 2; i <= N; i++)
    if (num[i] > 1) flag = 0;
  otpt();
}
