#include <bits/stdc++.h>
using namespace std;
const long long MAX = 510000;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) 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 main() {
  vector<bool> v = prime_table(1000);
  queue<int> q;
  for (long long i = 0; i < 1001; i++) {
    if (v[i]) {
      q.push(i);
    }
  }
  int n;
  cin >> n;
  vector<int> a(n);
  long long b = 1;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 1) {
      b = GCD(a[i], a[i - 1]);
    } else if (i != 0) {
      b = GCD(b, a[i]);
    }
  }
  if (b != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    bool flag = false;
    for (long long i = 0; i < n; i++) {
      if (a[i] % x == 0) {
        if (flag) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        flag = true;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
