#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
bool compare(pair<int, int>& p1, pair<int, int>& p2) {
  return p1.second < p2.second;
}
long long fp(vector<long long>& parents, long long a) {
  if (parents[a] == a) return a;
  return fp(parents, parents[a]);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<long long> findprimes() {
  long long* sieve = new long long[1005];
  for (int i = 2; i < 1010; i++) sieve[i] = i;
  for (int i = 2; i < 1010; i++) {
    if (sieve[i] == i) {
      for (int j = i; j * j < 1005; j += i) {
        sieve[j] *= (i - 1);
        sieve[j] /= i;
      }
    }
  }
  vector<long long> ans;
  for (int i = 2; i < 1001; i++) {
    if (sieve[i] == i - 1) {
      ans.push_back(i);
    }
  }
  return ans;
}
bool fc(long long n, vector<long long>& primes, set<long long>& p) {
  bool ans = true;
  for (int i = 0; i < primes.size(); i++) {
    long long ele = primes[i];
    if (n % ele == 0) {
      while (n % ele == 0) {
        n /= ele;
      }
      if (p.find(ele) != p.end()) {
        ans = false;
        break;
      } else
        p.insert(ele);
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long gcdis;
  cin >> gcdis;
  v[0] = gcdis;
  for (int i = 1; i < n; i++) {
    cin >> v[i];
    gcdis = gcd(gcdis, v[i]);
  }
  if (gcdis != 1) {
    cout << "not coprime";
  } else {
    vector<long long> primes = findprimes();
    set<long long> p;
    bool ans = true;
    for (int i = 0; i < n; i++) {
      ans = ans & fc(v[i], primes, p);
    }
    if (ans)
      cout << "pairwise coprime";
    else
      cout << "setwise coprime";
  }
}
