#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a.at(i);
  int sw = gcd(a.at(0), a.at(1));
  for (int i = 2; i < n; ++i) {
    if (sw == 1) break;
    sw = gcd(sw, a.at(i));
  }
  if (sw != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < n - 1; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (gcd(a.at(i), a.at(j)) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
