#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
void prtok(bool ok) { cout << (ok ? "Yes" : "No") << "\n"; }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
map<long long, long long> prime_factorize(long long n) {
  map<long long, long long> mp;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      mp[i]++;
      n /= i;
    }
  }
  if (n != 1) mp[n] = 1;
  return mp;
}
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = (long long)0; i < (long long)n; i++) {
    cin >> a[i];
  };
  int tmp = a[0];
  for (long long i = (long long)0; i < (long long)n; i++) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp != 1) {
    cout << ("not coprime") << "\n";
    return 0;
  }
  map<long long, int> chk;
  for (long long i = (long long)0; i < (long long)n; i++) {
    map<long long, long long> plist = prime_factorize(a[i]);
    for (auto k : plist) {
      chk[k.first]++;
    }
  }
  for (auto k : chk) {
    if (k.second > 1) {
      cout << ("setwise coprime") << "\n";
      return 0;
    }
  }
  cout << ("pairwise coprime") << "\n";
}
