#include <bits/stdc++.h>
using namespace std;
unordered_map<int, bool> prime_used;
vector<bool> are_prime;
int num_cnt;
vector<int> nums;
int max_num;
bool is_pairwise(void);
long long calc_gcd(long long a, long long b);
int main(void) {
  cin >> num_cnt;
  max_num = 0;
  for (int i = 0; i < num_cnt; i++) {
    int n;
    cin >> n;
    if (n > max_num) {
      max_num = n;
    }
    nums.push_back(n);
  }
  are_prime.resize(max_num + 1);
  are_prime[1] = false;
  for (int i = 2; i <= max_num; i++) {
    if (are_prime[i] == true) {
      for (int mul = 2; mul * i <= max_num; mul += 1) {
        are_prime[mul * i] = false;
      }
    }
  }
  if (is_pairwise()) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int current_gcd = nums[0];
  for (int i = 1; i < num_cnt; i++) {
    current_gcd = calc_gcd(current_gcd, nums[i]);
  }
  if (current_gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
bool is_pairwise(void) {
  for (int i = 0; i < num_cnt; i++) {
    for (int j = 2; j <= max_num; j++) {
      if (are_prime[j] == true) {
        if (nums[i] % j == 0) {
          if (prime_used.find(j) == prime_used.end()) {
            prime_used[j] == true;
            cout << "used " << j << " to " << nums[i] << endl;
          } else {
            cout << "while dividing " << nums[i] << endl;
            cout << j << " is used past" << endl;
            return false;
          }
        }
      }
    }
  }
  return true;
}
long long calc_gcd(long long a, long long b) {
  long long c = a % b;
  if (c == 0) {
    return b;
  }
  return calc_gcd(b, c);
}
