#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, flag, ans, i, j, k, a[N], vis[N];
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  ans = a[1];
  for (i = 2; i <= n; i++) ans = gcd(ans, a[i]);
  if (ans != 1)
    cout << "not coprime\n";
  else {
    for (i = 1; i < n; i++)
      for (j = i + 1; j <= n; j++)
        if (gcd(a[i], a[j]) != 1) {
          cout << "setwise coprime\n";
          return 0;
        }
    cout << "pairwise coprime\n";
  }
  return 0;
}
