#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
long long int bpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int fact(long long int n) {
  if ((n == 0) || (n == 1))
    return 1;
  else
    return n * fact(n - 1);
}
void go() {}
bool prime[1000001];
void SieveOfEratosthenes() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= 1000001; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= 1000001; i += p) prime[i] = false;
    }
  }
}
int main() {
  go();
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  std::cout.tie(NULL);
  SieveOfEratosthenes();
  long long int n;
  cin >> n;
  vector<long long int> v(n), uk(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    uk[i] = v[i];
  }
  map<long long int, long long int> mp;
  bool f = 0;
  for (int i = 0; i < n; i++) {
    for (long long int j = 2; j * j <= v[i]; j++) {
      if (prime[j]) {
        if (v[i] % j == 0 && mp.find(j) != mp.end()) {
          f = 1;
          break;
        }
        while (v[i] % j == 0) {
          v[i] /= j;
        }
        mp[j]++;
      }
    }
    if (f) break;
  }
  if (!f) {
    cout << "pairwise coprime"
         << "\n";
    return 0;
  }
  long long int yo = uk[0];
  for (long long int i = 1; i < n; i++) {
    yo = gcd(yo, uk[i]);
  }
  if (yo == 1) {
    cout << "setwise coprime"
         << "\n";
  } else
    cout << "not coprime"
         << "\n";
}
