#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<int> memo;
vector<long long> vec;
long long n;
int main() {
  cin >> n;
  vec.resize(n);
  for (long long i = 0; i < n; i++) cin >> vec.at(i);
  long long mx = *max_element(vec.begin(), vec.end());
  memo.resize(mx + 1, 0);
  bool is_pairwise = true;
  for (int i = 0; i < n; i++) memo.at(vec.at(i))++;
  for (int i = 2; i * i <= mx; i++) {
    int cnt = 0;
    for (int j = 1; i * j <= mx; j++) {
      if (memo.at(i * j)) cnt += memo.at(i * j);
    }
    if (cnt >= 2) {
      is_pairwise = false;
      break;
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = 0;
  for (int i = 0; i < n; i++) g = gcd(g, vec.at(i));
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
