#include <bits/stdc++.h>
using namespace std;
using vec_int = vector<long long>;
using P = pair<long long, long long>;
using T = tuple<long long, long long, long long>;
using ll = long long;
long long charToInt(char c) {
  char zero_num = '0';
  return (long long)c - (long long)zero_num;
}
signed Gcd(long m, long n) {
  long long temp;
  while (m % n != 0) {
    temp = n;
    n = m % n;
    m = temp;
  }
  return n;
}
std::vector<long long> Eratosthenes(const long long N) {
  std::vector<bool> is_prime(N + 1);
  std::vector<long long> SPF(N + 1);
  for (long long i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  SPF.at(1) = 1;
  for (long long i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (long long j = 2 * i; j <= N; j += i) {
        if (is_prime[j] != false) {
          is_prime[j] = false;
          SPF.at(j) = i;
        }
      }
      SPF.at(i) = 1;
    }
  }
  return SPF;
}
signed main() {
  long long N;
  cin >> N;
  vec_int A(N);
  long long max_A = 0;
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> A.at(i);
    if (max_A < A.at(i)) max_A = A.at(i);
  }
  long long current_val = A.at(0);
  for (long long i = 1; i < N; i++) {
    current_val = Gcd(current_val, A.at(i));
  }
  if (current_val != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vec_int SPF = Eratosthenes(max_A);
  vec_int check(max_A + 1, 0);
  for (long long i = 0; i < N; i++) {
    set<long long> soinsuu;
    long long num = A.at(i);
    while (true) {
      if (SPF.at(num) == 1) {
        soinsuu.insert(num);
        break;
      }
      soinsuu.insert(SPF.at(num));
      num = num / SPF.at(num);
    }
    for (auto num : soinsuu) {
      if (check.at(num) == 1) {
        cout << "setwise coprime" << endl;
        return 0;
      } else {
        check.at(num) = 1;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
