#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
const long long mod = 1e9;
const long long INF = 10000000;
void flash() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(9);
}
map<long long, long long> mp;
bool pr = 1;
void go(long long n) {
  set<long long> st;
  bool yo = 0;
  while (n % 2 == 0) {
    n /= 2;
    yo = 1;
  }
  if (yo == 1) {
    if (mp[2] > 0) pr = 0;
    mp[2]++;
  }
  for (long long i = 3; i <= sqrt(n); i += 2) {
    yo = 0;
    while (n % i == 0) {
      n /= i;
      yo = 1;
    }
    if (yo == 1) {
      if (mp[i] > 0) pr = 0;
      mp[i]++;
    }
  }
  if (n > 2) {
    if (mp[n] > 0) pr = 0;
    mp[n]++;
  }
}
void solve();
int32_t main() {
  flash();
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    go(a[i]);
  }
  if (pr == 1) {
    cout << "pairwise coprime\n";
    return;
  } else if (pr == 0) {
    for (auto i : mp) {
      if (i.first == n) {
        cout << "setwise coprime\n";
        return;
      }
    }
  }
  cout << "not coprime\n";
  return;
}
