#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b < a) return gcd(b, a);
  if (b % a == 0) return a;
  return gcd(b % a, a);
}
bool isPrime[1000001];
int cnt[10000];
vector<long long> primes;
map<long long, int> p2i;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  memset(isPrime, true, sizeof(isPrime));
  for (int i = 2; i < 1000001; i++) {
    if (isPrime[i]) {
      primes.emplace_back(i);
      for (int j = i + i; j < 1000001; j += i) {
        isPrime[j] = false;
      }
    }
  }
  for (int i = 0; i < (int)primes.size(); i++) {
    p2i[primes[i]] = i;
  }
  int setwise;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (i == 0)
      setwise = A[0];
    else
      setwise = gcd(setwise, A[i]);
  }
  sort(A.begin(), A.end());
  if (setwise != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  bool ok = true;
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; ok && i < N; i++) {
    for (int pi = 0; primes[pi] * primes[pi] <= A[i]; pi++) {
      int p = primes[pi];
      if (A[i] % p == 0) {
        cnt[pi]++;
        if (cnt[pi] >= 2) {
          ok = false;
        }
        while (A[i] % p == 0) A[i] /= p;
      }
    }
    if (A[i] != 1) {
      int pi = p2i[A[i]];
      cnt[pi]++;
      if (cnt[pi] >= 2) {
        ok = false;
      }
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
