#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int gcd(int a, int b) {
  int bigger = max(a, b);
  int smaller = min(a, b);
  if (bigger % smaller == 0) {
    return smaller;
  } else {
    return gcd(smaller, bigger % smaller);
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> data(n);
  for (long long i = 0; i < (n); i++) {
    int tmp;
    cin >> tmp;
    data.at(i) = tmp;
  }
  sort(data.begin(), data.end());
  vector<int> checks(1000, 1);
  checks.at(0) = 0;
  checks.at(1) = 0;
  for (int i = 2; i < 1000; i++) {
    if (checks.at(i) == 1) {
      for (int j = 2 * i; j < 1000; j += i) {
        checks.at(j) = 0;
      }
    }
  }
  vector<int> primes;
  for (int i = 2; i <= 999; i++) {
    if (checks.at(i) == 1) {
      primes.push_back(i);
    }
  }
  int mygcd = gcd(data.at(0), data.at(1));
  for (int i = 2; i <= n - 1; i++) {
    mygcd = gcd(mygcd, data.at(i));
  }
  int t = int(primes.size());
  vector<int> result(t);
  for (long long i = 0; i < (t); i++) {
    int tmp = 0;
    for (long long j = 0; j < (n); j++) {
      while (data.at(j) % primes.at(i) == 0) {
        data.at(j) /= primes.at(i);
      }
    }
    result.at(i) = tmp;
  }
  sort(data.begin(), data.end());
  bool flag = true;
  for (int i = 0; i < n - 2; i++) {
    if (data.at(i) == data.at(i + 1) and data.at(i) != 1) {
      flag = false;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else if (mygcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
