#include <bits/stdc++.h>
using namespace std;
map<int, set<int> > graph;
map<int, bool> used;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  T = 1;
  while (T--) {
    long long int n;
    cin >> n;
    vector<long long int> v(n);
    for (int i = 0; i < n; i++) cin >> v[i];
    bool pairw = true;
    bool setw = true;
    long long int prev = gcd(v[0], v[1]);
    if (prev != 1) pairw = false;
    for (int i = 2; i < n; i++) {
      long long int curr = gcd(prev, v[i]);
      if (curr != 1) {
        pairw = false;
      }
      prev = curr;
    }
    if (pairw) {
      cout << "pairwise coprime" << endl;
    } else if (prev == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
