#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using graph = vector<vector<int>>;
const ll mod = 1000000007;
const int INF = 1001001001;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> num(1000001);
  set<int> st;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    num[a[i]]++;
    st.insert(a[i]);
  }
  int mx = *max_element(a.begin(), a.end());
  int full = a[0];
  bool ok1 = false, ok2 = false;
  for (int i = 1; i < n; i++) {
    full = gcd(full, a[i]);
    if (full == 1) {
      ok1 = true;
      break;
    }
  }
  for (int i = 2; i * i <= mx; i++) {
    int cnt = 0;
    for (int j = 1; j * i <= mx; j++) {
      int tmp = i * j;
      if (tmp > mx) break;
      if (st.count(i * j)) {
        cnt += num[i * j];
        cnt++;
      }
      if (cnt >= 2) {
        ok2 = true;
        break;
      }
    }
    if (ok2) break;
  }
  if (!ok2 && ok1)
    cout << "pairwise coprime" << endl;
  else if (ok2 && ok1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
