#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
vector<bool> Eratosthenes(int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    int tmp = x % y;
    x = y;
    y = tmp;
  }
  return x;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  vector<bool> isprime = Eratosthenes(1000);
  vector<int> prime;
  for (int i = 0; i < (int)(1001); i++) {
    if (isprime[i]) prime.push_back(i);
  }
  map<int, bool> divisor;
  bool pairwise = true;
  for (int i = 0; i < (int)(n); i++) {
    for (int p : prime) {
      if (a[i] % p == 0) {
        if (divisor[p]) {
          pairwise = false;
        } else {
          divisor[p] = true;
        }
      }
    }
  }
  bool setwise = false;
  int g = a[0];
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
