#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000006];
int flg_p[1000006];
int cnt_a[1000006];
vector<int> list_input;
vector<int> list_prime;
map<int, int> mp;
bool flg_pairwise = true;
bool flg_setwise = true;
void init() {
  list_prime.push_back(2);
  flg_p[0] = flg_p[1] = true;
  for (int i = 2; i <= 1003; i += 2) {
    flg_p[i] = true;
  }
  for (int i = 3; i <= 1003; i += 2) {
    bool tf = false;
    for (int j = 3; j <= sqrt(i) && flg_p[i] == false; j++) {
      if (i % j == 0 && i != j) {
        tf = true;
        break;
      }
    }
    if (tf == false) {
      list_prime.push_back(i);
      for (int j = i; j <= 1003; j += i) {
        flg_p[j] = true;
      }
    }
  }
}
int main() {
  init();
  for (int i = 0; i < 1000006; i++) {
    cnt_a[i] = 0;
    flg_p[i] = false;
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt_a[a[i]]++;
    if (cnt_a[a[i]] == 1) {
      list_input.push_back(a[i]);
    } else {
      flg_pairwise = false;
    }
  }
  for (int i = 0; i < list_input.size(); i++) {
    int t = list_input[i];
    int c = 0;
    while (t != 1) {
      int tmp = list_prime[c];
      if (c == list_prime.size()) {
        tmp = t;
      }
      if (t % tmp == 0) {
        if (mp.count(tmp) != 0) {
          flg_pairwise = false;
          mp[tmp] = mp[tmp] + 1;
        } else {
          mp[tmp] = 1;
        }
        if (mp[tmp] == list_input.size()) {
          flg_setwise = false;
        }
        while (t % tmp == 0) {
          t /= tmp;
        }
      }
      c++;
    }
  }
  if (flg_pairwise == true)
    cout << "pairwise coprime" << endl;
  else if (flg_setwise == true)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return (0);
}
