#include <bits/stdc++.h>
using namespace std;
map<int64_t, int64_t> prime_fact(int64_t n) {
  int64_t a = 2;
  map<int64_t, int64_t> mp;
  while (n >= a * a) {
    if (n % a == 0) {
      mp[a]++;
      n /= a;
    } else {
      a++;
    }
  }
  if (n != 1) {
    mp[n]++;
  }
  return mp;
}
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec[i];
  }
  int coprime = 0;
  map<int, int> ans;
  for (int i = 0; i < N; i++) {
    map<int64_t, int64_t> A = prime_fact(vec[i]);
    for (auto itr = A.begin(); itr != A.end(); itr++) {
      ans[itr->first]++;
      coprime = max(coprime, ans[itr->first]);
    }
  }
  if (coprime <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (coprime != N) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
