#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
set<int> sieve_eratosthenes(int n) {
  vector<bool> v(n + 1, 1);
  set<int> p;
  int k = 2;
  while (k * k <= n) {
    if (v[k]) {
      for (int i = k * k; i <= n; i += k) {
        v[i] = 0;
      }
    }
    k++;
  }
  for (int i = 2; i <= n; i++) {
    if (v[i]) p.insert(i);
  }
  return p;
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  auto p = sieve_eratosthenes(1e7);
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int k = v[i];
    int j = 0;
    for (auto it = p.begin(); (*it * *it <= k) and it != p.end(); it++) {
      int x = *it;
      if (k % x == 0) {
        while (k % x == 0) k /= x;
        mp[x]++;
      }
      j++;
    }
    if (p.count(v[i])) mp[v[i]]++;
  }
  int ans = 0;
  for (auto it = p.begin(); it != p.end(); it++) {
    ans = max(mp[*it], ans);
  }
  if (ans == 1)
    cout << "pairwise coprime" << endl;
  else if (ans > 1 and ans < n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
