#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using P = pair<int, int>;
const int Max_A = 1e6;
const int INF = 1e8;
bool prime[Max_A];
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  vector<int> p;
  for (int i = 0; i < (int)(Max_A); i++) prime[i] = true;
  for (int i = 2; i * i <= Max_A; i++) {
    if (prime[i]) {
      p.emplace_back(i);
      for (int j = 2; j * i <= Max_A; j++) prime[j] = false;
    }
  }
  map<int, int> mp;
  for (int i = 0; i < (int)(N); i++) {
    int a = A[i];
    for (int j = 0; j < (int)(p.size()); j++) {
      if (a % p[j] == 0) mp[p[j]]++;
      while (a % p[j] == 0) a /= p[j];
    }
    if (a != 1) mp[a]++;
  }
  bool pairwise = true, setwise = true;
  for (auto itr : mp) {
    int num = itr.second;
    if (num >= 2) pairwise = false;
    if (num == N) setwise = false;
  }
  for (int i = 0; i < (int)(N); i++)
    if (A[i] == 1) setwise = true;
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
