#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long sz = 1e6 + 100;
const double PI = 3.14159265;
long long power(long long a, long long b, long long m = mod) {
  if (b == 0)
    return 1;
  else if (b == 1)
    return a % m;
  else {
    long long t = power(a, b >> 1, m);
    t = ((t % m) * (t % m)) % m;
    if (b & 1)
      return ((t % m) * (a % m)) % m;
    else
      return t % m;
  }
}
int isprime[sz] = {0};
vector<int> primes;
void seives(int n) {
  for (long long i = 0; i < n; i++) isprime[i] = 1;
  isprime[0] = isprime[1] = 0;
  for (long long i = 0; i < n; i++) {
    if (isprime[i]) {
      primes.push_back(i);
      for (int j = 2 * i; j < n; j += i) {
        isprime[j] = 0;
      }
    }
  }
}
void solve() {
  int n;
  cin >> n;
  int a[sz];
  for (long long i = 0; i < n; i++) cin >> a[i];
  seives(1e6 + 5);
  unordered_map<int, int> mp;
  int c = 0;
  for (long long i = 0; i < n; i++) {
    for (auto x : primes) {
      if (a[i] % x == 0) {
        mp[x]++;
      }
    }
  }
  for (auto x : mp) {
    if (x.second > 1) {
      c++;
    }
    if (x.second == n) {
      cout << "not coprime";
      return;
    }
  }
  if (c == 0) {
    cout << "pairwise coprime";
  } else {
    cout << "setwise coprime";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
  return 0;
}
