#include <bits/stdc++.h>
using namespace std;
int GCD(int former, int latter) {
  if (former % latter == 0) return latter;
  if (latter % former == 0) return former;
  return GCD(latter, former % latter);
}
int main(void) {
  int N, Abuf, gcdAll;
  bool isPairwise = true;
  vector<int> A;
  vector<long long> primes;
  vector<bool> covered;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> Abuf;
    A.push_back(Abuf);
    if (i == 0) {
      gcdAll = Abuf;
    } else {
      gcdAll = GCD(gcdAll, Abuf);
    }
  }
  if (gcdAll != 1) {
    cout << "not coprime" << endl;
  } else {
    primes.push_back(2LL);
    for (long long i = 3; i < 1000000; i += 2) {
      bool isPrime = true;
      for (long long j : primes) {
        if (i < j * j) break;
        if (i % j == 0) {
          isPrime = false;
          break;
        }
      }
      if (isPrime) primes.push_back(i);
    }
    if (primes.size() < N) {
      cout << "setwise coprime" << endl;
    } else {
      covered.assign(1000000, false);
      for (int i = 0; i < N; i++) {
        for (long long p : primes) {
          bool flgMultiplier = false;
          while (A[i] % p == 0) {
            if (covered[p]) {
              isPairwise = false;
              break;
            }
            flgMultiplier = true;
            A[i] /= p;
          }
          if (!isPairwise) break;
          if (flgMultiplier) {
            covered[p] = true;
          }
          if (A[i] == 1) break;
        }
        if (!isPairwise) break;
      }
      if (isPairwise) {
        cout << "pairwise coprime" << endl;
      } else {
        cout << "setwise coprime" << endl;
      }
    }
  }
  return 0;
}
