#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long exp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n) {
    if (n & 1) result = (result * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return result;
}
const int N = 1e6 + 1;
bool is_prime[N];
vector<int> prime;
void sieve() {
  fill_n(is_prime, N, 1);
  for (int i = 2; i * i < N; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      for (int j = i * i; j < N; j += i) is_prime[j] = 0;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (int i = 1; i < n; i++) g = gcd(g, a[i]);
  bool check = true;
  for (auto x : prime) {
    bool curr = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % x == 0) {
        if (curr) {
          check = 0;
          break;
        } else
          curr = 1;
      }
    }
    if (!check) break;
  }
  if (check)
    cout << "pairwise coprime"
         << "\n";
  else if (g == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
