#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
int a[1000001];
void solve() {
  int n;
  cin >> n;
  sieve();
  for (int i = 0; i < n; i++) cin >> a[i];
  unordered_map<int, int> mp;
  int sw = 1;
  int pw = 1;
  for (int i = 0; i < n; i++) {
    int x = a[i];
    while (x > 1) {
      mp[spf[x]]++;
      if (mp[spf[x]] > 1) pw = 0;
      if (mp[spf[x]] == n) sw = 0;
      while (x > 1 && x % spf[x] == 0) x = x / spf[x];
    }
  }
  if (pw)
    cout << "pairwise coprime"
         << "\n";
  else if (sw)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
