#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<long long, vector<long long>, greater<long long>> spqll;
typedef priority_queue<long long, vector<long long>, less<long long>> bpqll;
long long MOD = 1000000007;
long long INF = 1e18;
long double EPS = 1e-9;
long double PI = M_PI;
vector<long long> dx = {1, 0, -1, 0, 1, -1, -1, 1};
vector<long long> dy = {0, 1, 0, -1, 1, 1, -1, -1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void p() {
  cout << "pairwise coprime"
       << "\n";
}
void s() {
  cout << "setwise coprime"
       << "\n";
}
void no() {
  cout << "not coprime"
       << "\n";
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  long long tmp = gcd(a[0], a[1]);
  for (long long i = 2; i < n; i++) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp != 1) {
    no();
    return 0;
  }
  vector<bool> flag(1000000 + 10, false);
  for (long long i = 0; i < n; i++) {
    if (flag[a[i]]) {
      s();
      return 0;
    }
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (flag[j] || flag[a[i] / j]) {
          s();
          return 0;
        }
        flag[j] = true;
        flag[a[i] / j] = true;
      }
    }
    flag[a[i]] = true;
  }
  p();
  return 0;
}
