#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
inline long long ceildiv(long long a, long long b) { return (a + b - 1) / b; }
using Graph = std::vector<std::vector<int>>;
const long long inf = 10e17;
const long long mod = 1000000007;
int main() {
  int n;
  cin >> n;
  int x;
  vector<int> primes;
  vector<int> cnt(primes.size(), 0);
  int p;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    cin >> x;
    for (int(j) = 0; (j) < (int)(primes.size()); (j)++) {
      p = primes[j];
      if (x % p == 0) {
        while (x % p == 0) x /= p;
        cnt[j]++;
      }
    }
    if (x != 1) {
      for (int p = 2; p * p <= x; p++) {
        if (x % p == 0) {
          while (x % p == 0) x /= p;
          cnt.emplace_back(1);
          primes.emplace_back(p);
        }
      }
    }
    if (x != 1) {
      cnt.emplace_back(1);
      primes.emplace_back(x);
    }
  }
  for (int j : cnt) {
    if (j < 2) {
      continue;
    }
    goto ne;
  }
  cout << "pairwise coprime" << endl;
  return 0;
ne:
  for (int j : cnt) {
    if (j != n) continue;
    goto nne;
  }
  cout << "setwise coprime" << endl;
  return 0;
nne:
  cout << "not coprime" << endl;
}
