#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, i, j, k;
  cin >> n;
  long long a[n];
  long long prod = 1;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    prod *= a[i];
  }
  long long gd = gcd(a[0], a[1]), lm = (a[0] * a[1]) / gd;
  for (i = 2; i < n; i++) {
    gd = gcd(gd, a[i]);
    lm = (lm * a[i]) / gcd(a[i], lm);
  }
  if (gd != 1)
    cout << "not coprime\n";
  else if (lm != prod)
    cout << "setwise coprime\n";
  else
    cout << "pairwise coprime\n";
  return 0;
}
