#include <bits/stdc++.h>
using namespace std;
void parseArray(long long* A, long long n) {
  for (long long K = 0; K < n; K++) {
    cin >> A[K];
  }
}
long long modInverse(long long a, long long b) {
  return 1 < a ? b - modInverse(b % a, a) * b / a : 1;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long double dist(long double x, long double y, long double a, long double b) {
  return sqrt((x - a) * (x - a) + (y - b) * (y - b));
}
void debug(long long* a, long long n) {
  for (long long k = 0; k < n; k++) {
    cerr << a[k] << " ";
  }
  cout << "\n";
}
const long long mod = 22801763489;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long a[n];
  parseArray(a, n);
  long long gcdd = a[0];
  bool flag = true;
  bool div[1111111];
  memset(div, 0, sizeof div);
  for (int k = 0; k < n; k++) {
    gcdd = gcd(a[k], gcdd);
    if (!flag) continue;
    for (long long j = 2; j * j <= a[k]; j++) {
      if (a[k] % j == 0) {
        if (div[j]) flag = false;
        div[j] = true;
        if (a[k] / j != j) {
          if (div[a[k] / j]) flag = false;
          div[a[k] / j] = true;
        }
      }
    }
  }
  if (flag) return cout << "pairwise coprime\n", 0;
  if (gcdd == 1) return cout << "setwise coprime\n", 0;
  cout << "not coprime\n";
  return 0;
}
