#include <bits/stdc++.h>
using namespace std;
long long nxt() {
  long long x;
  cin >> x;
  return x;
}
vector<long long> primes;
void generateP() {
  vector<bool> p(1000000, 0);
  for (int i = 3; i < 1000; i += 2) {
    if (p[i] == 0) {
      for (int j = i * i; j < 1000000; j += i + i) {
        p[j] = 1;
      }
    }
  }
  primes.push_back(2);
  for (int i = 3; i < 1000000; i += 2) {
    if (!p[i]) primes.push_back(i);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  generateP();
  map<long long, long long> primeFact;
  bool pairWise = true, setWise = true;
  long long n = nxt();
  vector<long long> a(n);
  generate((a).begin(), (a).end(), nxt);
  for (long long x : a) {
    if (x == 1) continue;
    long long sqrx = sqrt((double)x);
    bool f = false;
    for (int i = 0; primes[i] <= sqrx; i++) {
      if (x % primes[i] == 0) {
        primeFact[primes[i]]++;
        f = true;
        while (x && x % primes[i] == 0) {
          x /= primes[i];
          sqrx = sqrt((double)x);
        }
      }
    }
    if (!f) {
      if (pairWise && primeFact[x]) pairWise = false;
      primeFact[x]++;
    }
  }
  long long maxCNT = 0;
  for (auto it = primeFact.begin(); it != primeFact.end(); it++) {
    maxCNT = max(maxCNT, (*it).second);
  }
  if (maxCNT <= 1)
    cout << "pairwise coprime" << '\n';
  else if (maxCNT < n)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
  return 0;
}
