#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void yes() {
  cout << "Yes\n";
  return;
}
void no() {
  cout << "No\n";
  return;
}
const int mxP = 1e6 + 1;
int ck[mxP];
void prime_fact(int n) {
  int haha = ceil(sqrt(n));
  for (int i = 2; i <= haha; i++) {
    if (n % i == 0) {
      ck[i]++;
      while (n % i == 0) {
        n /= i;
      }
    }
  }
  return;
}
void solve(int case_no) {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    prime_fact(a[i]);
  }
  bool ck1 = true, ck2 = true;
  for (int i = 2; i <= 1e6; i++) {
    if (ck[i] > 1) ck1 = false;
    if (ck[i] == n) ck2 = false;
  }
  if (ck1)
    cout << "pairwise coprime\n";
  else if (ck2)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  srand(time(NULL));
  int t = 1;
  for (int i = 1; i <= t; i++) solve(i);
}
