#include <bits/stdc++.h>
using namespace std;
long long Size = 1e6 + 7;
long long parent[1000010];
long long Rank[1000010];
long long SIZE[1000010];
long long mx = 0;
long long GCD(long long a, long long b) { return (b == 0) ? a : GCD(b, a % b); }
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
vector<long long> prime;
long long ar[10000010];
void sive() {
  long long i, j, k;
  for (i = 2; i * i <= 1e7; i++) {
    if (ar[i]) continue;
    prime.push_back(i);
    for (j = i + i; j <= 1e7; j += i) ar[j] = 1;
  }
}
int main() {
  long long n, m;
  long long i, j, k;
  sive();
  long long a, b;
  cin >> n;
  vector<long long> adj[n + 10];
  vector<long long> v;
  for (i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  long long set_pair = 0;
  long long gcd = v[0];
  long long mx = 0;
  map<long long, long long> mp;
  for (i = 0; i < n; i++) {
    a = v[i];
    gcd = GCD(gcd, a);
    for (j = 0; j < prime.size() && prime[j] * prime[j] <= a; j++) {
      long long f = 0;
      while (a % prime[j] == 0) {
        f = 1;
        a /= prime[j];
      }
      if (f) {
        mp[prime[j]]++;
        mx = max(mp[prime[j]], mx);
      }
    }
    if (a > 1) {
      mp[a]++;
      mx = max(mp[a], mx);
    }
  }
  if (mx == 1)
    cout << "pairwise coprime" << endl;
  else if (gcd == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
