#include <bits/stdc++.h>
using namespace std;
int q, n;
long long int ans, sum;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long int powe(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a);
    }
    a = (a * a);
    b /= 2;
  }
  return res;
}
long long int power(long long int a, long long int b, long long int M) {
  a %= M;
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a) % M;
    }
    a = (a * a) % M;
    b /= 2;
  }
  return res;
}
const int N = 1000001;
long long int a[N], b[N], dp[N];
void testcase() {
  cin >> n;
  set<long long int> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    v.insert(dp[a[i]]);
  }
  ans = a[0];
  for (int i = 1; i <= n - 1; i++) ans = gcd(a[i], ans);
  if (ans != 1) cout << "not coprime\n", exit(0);
  if (v.size() == n)
    cout << "pairwise coprime\n", exit(0);
  else
    cout << "setwise coprime\n", exit(0);
  return;
}
int main() {
  for (int i = 0; i < N; i++) dp[i] = i;
  dp[0] = -1, dp[1] = -1;
  for (int i = 0; i < N; i += 2) dp[i] = 2;
  for (int i = 3; i < N; i += 2) {
    if (dp[i] == i) {
      for (int j = i; j < N; j += i)
        if (dp[j] == j) dp[j] = i;
    }
  }
  testcase();
  return 0;
}
