#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll m, ll n) {
  if (n == 0) return m;
  return gcd(n, m % n);
}
const int N = 1000010;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  vector<bool> isPrime(N + 1, 1);
  vector<int> Prime;
  for (int i = 2; i <= N; i++) {
    if (isPrime[i]) {
      Prime.push_back(i);
      for (int j = 2 * i; j <= N; j += i) isPrime[j] = 0;
    }
  }
  bool ans1 = 1, ans2 = 1;
  map<int, int> mp;
  for (int i = 0; i < (int)(n); i++) {
    for (auto x : Prime) {
      if (a[i] % x == 0) {
        if (mp[x] != 0) ans1 = 0;
        mp[x] = 1;
      }
    }
  }
  int p = 0;
  for (int i = 0; i < (int)(n); i++) {
    p = gcd(p, a[i]);
  }
  if (p != 1) ans2 = 0;
  if (ans1)
    cout << "pairwise coprime" << endl;
  else if (ans2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
