#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
map<int, int> mp;
vector<int> s;
void divisor(int n) {
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      mp[i]++;
      s.push_back(i);
      if (i * i != n) {
        mp[n / i]++;
        s.push_back(n / i);
      }
    }
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, d, m, n, maxi = 0, f = 0, mini = 123, sum = 0;
  string str;
  cin >> n;
  vector<int> v(n);
  for (int i = (int)(0); i < (int)(n); i++) cin >> v[i];
  for (int i = (int)(0); i < (int)(n); i++) {
    divisor(v[i]);
  }
  maxi = 1;
  for (int i = (int)(0); i < (int)(s.size()); i++) {
    if (s[i] == 1) continue;
    maxi = max(mp[s[i]], maxi);
  }
  if (maxi == n)
    cout << "not coprime" << endl;
  else if (maxi == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
