#include <bits/stdc++.h>
using namespace std;
const int max_n = 1e6 + 10;
int a[max_n];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  unordered_map<int, int> m;
  for (int i = 0; i < n; ++i) {
    int x = a[i];
    for (int j = 2; j <= x / j; ++j) {
      if (x % j == 0) m[j]++;
      while (x % j == 0) x /= j;
    }
    if (x > 1) m[x]++;
  }
  bool flag = true;
  for (auto item : m) {
    if (item.second > 1) {
      flag = false;
      break;
    }
  }
  int g = 0;
  int cnt = m.size();
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else {
    for (auto item : m) {
      if (item.second == cnt) {
        g = 1;
        break;
      }
    }
  }
  if (g == 0) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  if (g == 1) {
    cout << "not coprime" << endl;
    return 0;
  }
}
