#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000 * 1000 * 1000 + 7;
const long long INF = 1ll * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7;
const long long MOD2 = 998244353;
const long long N = 1000 * 1000 + 10;
const long long N2 = 70;
const long double PI = 3.141592653589793;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long p = LLONG_MAX) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
void solve() {}
const long long MAXN = 1000001;
long long spf[MAXN];
long long hash1[MAXN] = {0};
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < MAXN; i++) spf[i] = i;
  for (long long i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void getFactorization(long long x) {
  long long temp;
  while (x > 1) {
    temp = spf[x];
    if (x % temp == 0) {
      hash1[spf[x]]++;
      x = x / spf[x];
    }
    while (x % temp == 0) x = x / temp;
  }
}
bool check(long long x) {
  long long temp;
  while (x != 1) {
    temp = spf[x];
    if (x % temp == 0 && hash1[temp] > 1) return false;
    while (x % temp == 0) x = x / temp;
  }
  return true;
}
bool hasValidNum(long long a[], long long n) {
  sieve();
  for (long long i = 0; i < n; i++) getFactorization(a[i]);
  for (long long i = 0; i < n; i++)
    if (check(a[i])) return true;
  return false;
}
vector<long long> p;
bool a[1000001];
void s() {
  memset(a, 0, sizeof(a));
  for (long long i = 2; i < 1000001; i++) {
    if (a[i] == 0) {
      p.push_back(i);
      for (long long j = i * i; j < 1000001; j += i) {
        a[j] = 1;
      }
    }
  }
  return;
}
bool f(long long a[], long long n) {
  s();
  set<long long> s;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < p.size(); j++) {
      if (p[j] > a[i]) break;
      if (a[i] % p[j] == 0) {
        if (s.find(p[j]) == s.end()) {
          s.insert(p[j]);
        } else {
          return false;
        }
      }
    }
  }
  return true;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (hasValidNum(a, n)) {
    cout << "pairwise coprime";
    return 0;
  }
  long long ans = a[0];
  for (long long i = 1; i < n; i++) {
    ans = gcd(ans, a[i]);
  }
  if (ans == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
