#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ul = unsigned long long;
using ld = long double;
ll mod = 1000000007;
ll gcd(ll a, ll b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll n;
  cin >> n;
  ll a[n];
  for (ll i = (0); i < (n); i++) {
    cin >> a[i];
  }
  string p = "pairwise coprime", s = "setwise coprime", o = "not coprime";
  ll gcd_all = a[0];
  for (ll i = (1); i < (n); i++) {
    gcd_all = gcd(gcd_all, a[i]);
  }
  if (gcd_all != 1) {
    cout << o << endl;
    return 0;
  }
  map<ll, ll> prime_all;
  for (ll j = (0); j < (n); j++) {
    ll num = a[j];
    for (ll i = 2; i * i <= num; i++) {
      if (num % i == 0) {
        if (prime_all[i]) {
          cout << s << endl;
          return 0;
        }
        prime_all[i]++;
        while (num % i == 0) {
          num /= i;
        }
      }
    }
    if (num != 1) {
      prime_all[num]++;
    }
  }
  cout << p << endl;
  return 0;
}
