#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
  int n;
  cin >> n;
  int a[n], mx = 0;
  map<int, int> mp;
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
    mp[a[i]]++;
    mx = max(mx, a[i]);
  }
  vector<ll> v(mx + 1, 0);
  bool check = true, check2 = true;
  for (ll i = 1; i <= mx; i++) {
    if (v[i] != 0) continue;
    v[i]++;
    int cnt = 0;
    for (ll j = i * 2; j <= mx; j += i) {
      v[j]++;
      if (mp[j] >= 1) cnt++;
    }
    if (cnt > 3) check = false;
    if (cnt == n + 1) check2 = false;
  }
  if (check && check2)
    cout << "pairwise coprime" << endl;
  else if (!check && check2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
