#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int nonprimes = 0;
  for (long long int i = 0; i < n; i++) {
    long long int ele = a[i];
    long long int count = 0;
    for (long long int j = 2; j * j <= ele; j++) {
      if (ele % j == 0) {
        count++;
        break;
      }
    }
    if (count != 0) nonprimes++;
  }
  if (nonprimes <= 1) {
    cout << "pairwise coprime";
    return;
  }
  long long int GCD = a[0];
  for (long long int i = 1; i < n; i++) GCD = gcd(GCD, a[i]);
  if (GCD == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return;
}
int32_t main() {
  long long int T = 1;
  for (long long int i = 1; i <= T; i++) solve();
  return 0;
}
