#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1000000007;
constexpr int inf = 1000000000;
constexpr ll linf = 1000000000000000000;
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  bool flag1 = true;
  bool flag2 = true;
  for (int k = 0; k < n; ++k) {
    int a;
    cin >> a;
    for (ll i = 2; i * i <= a; ++i) {
      if (a % i != 0) continue;
      while (a % i == 0) {
        a /= i;
      }
      if (mp[i] > 0) flag1 = false;
      ++mp[i];
    }
    if (a != 1) {
      if (mp[a] > 0) flag1 = false;
      ++mp[a];
    }
  }
  if (flag1) {
    cout << "pairwise coprime" << endl;
  } else {
    for (auto e : mp) {
      if (e.second == n) flag2 = false;
    }
    if (flag2)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
