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