#include <bits/stdc++.h>
using namespace std;
long long N;
vector<long long> A;
long long flag[1000010];
long long gcd(long long a, long long b) {
  while (b) {
    long long t = a;
    a = b;
    b = t % b;
  }
  return a;
}
vector<pair<long long, long long> > factorize(long long n) {
  vector<pair<long long, long long> > res;
  for (long long i = 2; i * i <= n; i++) {
    long long cnt = 0;
    while (n % i == 0) {
      cnt++;
      n /= i;
    }
    if (cnt > 0) res.push_back(pair<long long, long long>(i, cnt));
  }
  if (n != 1) res.push_back(pair<long long, long long>(n, 1));
  return res;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  for (long long i = 0; i < N; i++) {
    long long Ai;
    cin >> Ai;
    if (Ai != 1) A.push_back(Ai);
  }
  N = A.size();
  if (N > 78500) {
    long long G = 0;
    for (long long i = 0; i < N; i++) G = gcd(G, A[i]);
    if (G == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  } else {
    bool F = true;
    for (long long i = 0; i < N; i++) {
      vector<pair<long long, long long> > fct = factorize(A[i]);
      for (long long j = 0; j < fct.size(); j++) {
        long long p = fct[j].first;
        if (flag[p] == 1) F = false;
        flag[p] = 1;
      }
    }
    if (F)
      cout << "pairwise coprime" << endl;
    else {
      long long G = 0;
      for (long long i = 0; i < N; i++) G = gcd(G, A[i]);
      if (G == 0 || G == 1)
        cout << "setwise coprime" << endl;
      else
        cout << "not coprime" << endl;
    }
  }
}
