#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> prime_fact(int n) {
  vector<pair<int, int>> ans;
  int posi = 2;
  int copy = n;
  while (posi * posi <= n) {
    if (copy % posi == 0) {
      int times = 0;
      while (copy % posi == 0) {
        copy = copy / posi;
        times++;
      }
      pair<int, int> add;
      add.first = posi;
      add.second = times;
      ans.push_back(add);
    }
    posi++;
  }
  if (copy != 1) {
    pair<int, int> add;
    add.first = copy;
    add.second = 1;
    ans.push_back(add);
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int ma = 1000000;
  bool isprime[ma + 1];
  for (int i = 0; i <= ma; i++) isprime[i] = true;
  isprime[0] = false;
  isprime[1] = false;
  int posi = 2;
  while (posi * posi <= ma) {
    if (isprime[posi]) {
      int times = posi;
      while (posi * times <= ma) {
        isprime[posi * times] = false;
        times++;
      }
    }
    posi++;
  }
  int table[ma + 1];
  for (int i = 0; i < ma + 1; i++) table[i] = 0;
  bool ispair = true;
  bool unknown = true;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) {
      unknown = false;
      if (table[1] == 0) table[1] = 1;
      continue;
    }
    vector<pair<int, int>> fact = prime_fact(a[i]);
    int m = fact.size();
    for (int j = 0; j < m; j++) {
      int p = fact[j].first;
      table[p]++;
    }
  }
  int check = *max_element(table, table + ma + 1);
  if (check == 1)
    cout << "pairwise coprime" << endl;
  else if (check == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
