#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long c = a % b;
  if (c == 0) return b;
  return gcd(b, c);
}
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  sort(res.begin(), res.end());
  res.erase(unique(res.begin(), res.end()), res.end());
  return res;
}
int main() {
  long long N;
  map<long long, long long> mp;
  cin >> N;
  long long A;
  cin >> A;
  vector<long long> res = enum_divisors(A);
  long long max = 0;
  for (long long vl : res) {
    if (vl == 1) continue;
    mp[vl]++;
    max = 1;
  }
  for (long long i = 1; i < N; i++) {
    long long B;
    cin >> B;
    A = gcd(A, B);
    vector<long long> res = enum_divisors(B);
    for (long long vl : res) {
      if (vl == 1) continue;
      mp[vl]++;
      if (mp[vl] > max) max = mp[vl];
    }
  }
  if (max == 1)
    cout << "pairwise coprime" << endl;
  else if (A == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
