#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long SZ = 1e6;
template <long long N>
struct Prime {
  bitset<N + 1> b;
  Prime() : b() {
    b.flip();
    b[0] = b[1] = false;
    for (long long i = 2; i <= N; ++i) {
      if (b[i]) {
        for (long long j = i * i; j <= N; j += i) {
          b[j] = false;
        }
      }
    }
  }
};
Prime<SZ> prime;
void solve() {
  long long N;
  cin >> N;
  vector<long long> A(N), D(SZ + 1);
  for (auto &x : A) {
    cin >> x;
    D[x]++;
  }
  bool pc = true;
  for (long long i = (0), i_len = (SZ); i < i_len; ++i) {
    if (prime.b[i]) {
      long long cnt = 0;
      for (long long now = i; now <= SZ && cnt <= 1; now += i) {
        cnt += D[now];
      }
      if (cnt >= 2) {
        pc = false;
        break;
      }
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else {
    long long g = A[0];
    for (auto &x : A) {
      g = gcd(g, x);
    }
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
signed main() { cin.tie(nullptr)->sync_with_stdio(false); }
