#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<int> > prime(1e6 + 1);
  vector<bool> seive(1e6 + 1, 1);
  seive[0] = seive[1] = 0;
  prime[1].push_back(1);
  for (int i = 2; i <= 1e6; i++) {
    if (!seive[i]) continue;
    prime[i].push_back(i);
    for (int j = i + i; j <= 1e6; j += i) {
      seive[j] = 0;
      prime[j].push_back(i);
    }
  }
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    for (auto j : prime[a[i]]) {
      mp[j]++;
    }
  }
  bool flag = 0;
  for (auto i : mp) {
    if (i.second >= 2) {
      flag = 1;
      break;
    }
  }
  if (!flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  flag = 0;
  for (auto i : mp) {
    if (i.second == n) {
      flag = 1;
      break;
    }
  }
  if (!flag || mp[1]) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
