#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long int MOD = 1e9 + 7;
const long long int INF = 1e18;
const long double PI = (acos(-1));
long long int N;
vector<long long int> arr;
vector<long long int> A;
void Eratosthenes() {
  for (long long int i = 0; i <= 1000000; i++) {
    arr[i] = 1;
  }
  for (long long int i = 2; i * i < N; i++) {
    if (arr[A[i]]) {
      for (long long int j = 0; A[i] * (j + 2) < N; j++) {
        arr[A[i] * (j + 2)] = 0;
      }
    }
  }
  for (long long int i = 2; i < N; i++) {
    if (arr[i]) {
    }
  }
}
signed main() {
  cin >> N;
  arr.resize(N + 1);
  A.resize(N);
  for (long long int i = 0; i < (long long int)(N); i++) cin >> A[i];
  long long int setwise = A[0];
  for (long long int i = 0; i < (long long int)(N); i++) {
    setwise = gcd(setwise, A[i]);
  }
  if (setwise != 1) {
    cout << "not coprime";
    return 0;
  }
  map<long long int, long long int> m;
  for (long long int i = 0; i < (long long int)(N); i++) {
    long long int a = 2;
    long long int n = A[i];
    long long int cnt = 0;
    while (n >= a * a) {
      if (n % a == 0) {
        if (m[a] != 0) {
          if (m[a] != cnt) {
            cout << "setwise coprime";
            return 0;
          }
        }
        m[a]++;
        n /= a;
        cnt++;
      } else {
        a++;
        cnt = 0;
      }
    }
    if (m[n] != 0 && m[n] != cnt) {
      cout << "setwise coprime";
      return 0;
    }
    m[n]++;
  }
  cout << "pairwise coprime";
}
