#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long maxn = 1e6 + 1;
vector<bool> prime(maxn, true);
vector<bool> mp(maxn);
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tt = 1;
  for (; tt; tt--) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    long long GCD = 0;
    bool p_w = true;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      GCD = gcd(GCD, a[i]);
      if (mp[a[i]]) p_w = false;
      mp[a[i]] = true;
    }
    if (p_w) {
      for (long long i = 2; i < maxn; i++) {
        if (prime[i]) {
          long long cnt = 0;
          for (long long j = i; j < maxn; j += i) {
            prime[j] = false;
            if (mp[j]) cnt++;
          }
          if (cnt > 1) p_w = false;
        }
      }
    }
    if (p_w) {
      cout << "pairwise coprime" << endl;
    } else {
      if (GCD == 1) {
        cout << "setwise coprime" << endl;
      } else {
        cout << "not coprime" << endl;
      }
    }
  }
  return 0;
}
