#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const int N = 1e6 + 5;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool p[N];
long long mp[N];
vector<long long> primes;
bool pairw = true;
void fac(long long x) {
  for (auto p : primes) {
    if (p > x) break;
    if (x % p == 0) {
      mp[p]++;
      if (mp[p] > 1) pairw = false;
      while (x % p == 0) {
        x /= p;
      }
    }
  }
  if (x > 1) {
    mp[x]++;
    if (mp[x] > 1) pairw = false;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  p[0] = p[1] = true;
  for (long long i = 2; i * i <= N; i++)
    if (!p[i])
      for (long long j = i * i; j < N; j += i) p[j] = true;
  for (int i = (0), ThxMK = (N); i < ThxMK; ++i)
    if (!p[i]) primes.push_back(i);
  long long n;
  cin >> n;
  vector<long long> v(n);
  set<long long> st;
  long long x = 0;
  for (int i = (0), ThxMK = (n); i < ThxMK; ++i) {
    cin >> v[i];
    if (x)
      x = gcd(x, v[i]);
    else
      x = v[i];
    fac(v[i]);
  }
  if (pairw)
    cout << "pairwise coprime" << '\n';
  else if (x == 1)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
  return 0;
}
