#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238462643383;
const long long INF = 1e9 + 7;
const long long mod = 998244353;
int getID(char c) {
  if (c == ' ') return 0;
  return c - 'a' + 1;
}
void solve() {
  int n;
  cin >> n;
  int mx = 0, g = 0, mn = 1000;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
    mn = min(mn, a[i]);
  }
  bool f = 1;
  mx = sqrt(mx);
  for (int i = 2; i < mx + 2; i++) {
    int ct = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % i == 0) ct++;
    }
    if (ct >= 2) {
      f = 0;
    }
    if (ct == n) {
      g = 1;
    }
  }
  if (f) {
    cout << "pairwise coprime";
  } else {
    if (g == 0) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
