#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b ? gcd(b, a % b) : a;
}
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  return a / gcd(a, b) * b;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> cnt(1e6 + 1), b;
  cin >> a[0];
  ll res = a[0];
  bool prime = true;
  cnt[a[0]]++;
  b.push_back(a[0]);
  for (int i = 1, i_len = (n - 1); i <= i_len; i++) {
    cin >> a[i];
    res = gcd(res, a[i]);
    if (cnt[a[i]] == 0) b.push_back(a[i]);
    if (a[i] != 1 && cnt[a[i]] > 0) prime = false;
    cnt[a[i]]++;
  }
  if (res != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (!prime) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  for (int i = 0, i_len = (((int)(b).size())); i < i_len; i++)
    for (int j = i + 1; j < ((int)(b).size()); ++j) {
      if (gcd(b[i], b[j]) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  cout << "pairwise coprime" << endl;
  return 0;
}
