#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
int gcd(int a, int b) {
  if (a == 0LL) return b;
  return gcd(b % a, a);
}
set<int> m;
int primeFactors(int n) {
  int x = n;
  while (n % 2 == 0) {
    n = n / 2;
  }
  if (n < x) {
    if (m.find(2) != m.end()) {
      return 0;
    } else {
      m.insert(2);
    }
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      if (m.find(i) != m.end()) {
        return 0;
      } else {
        m.insert(i);
      }
      n = n / i;
    }
  }
  if (n > 2) {
    if (m.find(n) != m.end()) {
      return 0;
    } else {
      m.insert(n);
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int testcases = 1;
  while (testcases--) {
    int n;
    cin >> n;
    int a[n];
    set<int> s;
    m.clear();
    int tmp = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (s.find(a[i]) != s.end()) {
        tmp = 1;
      } else {
        s.insert(a[i]);
      }
    }
    if (tmp) {
      cout << "not coprime\n";
      continue;
    }
    int pc = 1;
    int sc = 1;
    for (int i = 0; i < n; i++) {
      int t = primeFactors(a[i]);
      if (!t) {
        pc = 0;
        break;
      }
    }
    m.clear();
    if (pc) {
      cout << "pairwise coprime\n";
      continue;
    }
    int g = a[0];
    for (int i = 1; i < n; i++) {
      g = gcd(max(g, a[i]), min(g, a[i]));
    }
    if (g == 1) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
  return 0;
}
