#include <bits/stdc++.h>
using namespace std;
long long factors[1000001];
void findFactors(long long n) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i) {
        factors[i]++;
      } else {
        factors[i]++;
        factors[n / i]++;
      }
    }
  }
}
long long findgcd(long long a, long long b) {
  if (b == 0) return a;
  return findgcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n{0};
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long gcd = arr[0];
  for (long long i = 0; i < n; i++) {
    gcd = findgcd(gcd, arr[i]);
  }
  for (long long i = 0; i < n; i++) {
    findFactors(arr[i]);
  }
  bool possible = true;
  for (long long i = 2; i < 1000001; i++) {
    if (factors[i] > 1) {
      possible = false;
      break;
    }
  }
  if (possible) {
    cout << "pairwise coprime" << '\n';
  } else if (gcd == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
