#include <bits/stdc++.h>
using namespace std;
vector<bool> is_prime(2001000, true);
vector<pair<long long, long long>> prime_num;
void init(long long n) {
  is_prime[0] = false;
  is_prime[1] = false;
  long long j;
  for (long long i = 2; i <= n; i++) {
    if (is_prime[i] == true) {
      j = i + i;
      while (j <= n) {
        is_prime[j] = false;
        j = j + i;
      }
    }
  }
  for (long long i = 2; i <= n; i++) {
    if (is_prime[i] == true) {
      prime_num.push_back(make_pair(i, 0));
    }
  }
}
void factorize_sum(long long n) {
  for (long long i = 0; i < prime_num.size(); i++) {
    if (n % prime_num[i].first != 0) {
      continue;
    }
    while (n % prime_num[i].first == 0) {
      n /= prime_num[i].first;
    }
    prime_num[i].second++;
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long max_num = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    max_num = max(max_num, a[i]);
  }
  init(max_num);
  for (long long i = 0; i < n; i++) {
    factorize_sum(a[i]);
  }
  long long max_ans = 0;
  for (long long i = 0; i < prime_num.size(); i++) {
    max_ans = max(max_ans, prime_num[i].second);
  }
  if (max_ans == 1) {
    cout << "pairwise coprime" << endl;
  } else if (max_ans < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
