#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O0")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("-ffloat-store")
void get(long long arr[], long long n) {
  for (long long i = 0; i < n; i++) cin >> arr[i];
}
long long gcd(long long a, long long b);
long long binpow(long long a, long long b);
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  long long all = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    all = gcd(a[i], all);
  }
  if (all != 1)
    cout << "not coprime";
  else {
    map<long long, long long> m;
    bool f = true;
    for (int i = 0; i < n; i++) {
      for (long long j = 2; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          if (m[j] == 1) {
            f = false;
            break;
          } else
            m[j]++;
        }
      }
      if (m[a[i]] == 1)
        f = false;
      else
        m[a[i]]++;
      if (!f) break;
    }
    if (!f)
      cout << "setwise coprime";
    else
      cout << "pairwise coprime";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
