#include <bits/stdc++.h>
long table[1000000 + 1] = {};
void prime(long num) {
  long limit = std::sqrt(num);
  if (limit * limit < num) {
    limit++;
  }
  for (long i = 2; i <= limit; i++) {
    long temp = 0;
    if (num % i == 0) {
      while (num % i == 0) {
        num = num / i;
        temp++;
      }
    }
    if (table[i] < temp) {
      table[i] = temp;
    }
  }
  if (num > limit) {
    long temp = 1;
    if (table[num] < temp) {
      table[num] = temp;
    }
  }
}
long gcd(long a, long b) {
  if (a < b) {
    long temp = a;
    a = b;
    b = temp;
  }
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  long N;
  std::cin >> N;
  long A[1000000];
  for (long i = 0; i < N; i++) {
    std::cin >> A[i];
  }
  long gcdnum = A[0];
  for (long i = 1; i < N; i++) {
    gcdnum = gcd(gcdnum, A[i]);
  }
  for (long i = 0; i < N; i++) {
    A[i] = A[i] / gcdnum;
    prime(A[i]);
  }
  long mulgcd = gcdnum;
  long MOD = 1000000000 + 7;
  for (long i = 2; i < 1000000 + 1; i++) {
    if (table[i] != 0) {
      long temp = 1;
      for (long j = 0; j < table[i]; j++) {
        temp *= i;
        temp = temp % MOD;
      }
      mulgcd = mulgcd * temp;
      mulgcd = mulgcd % MOD;
    }
  }
  long mul = 1;
  for (long i = 0; i < N; i++) {
    mul *= A[i];
    mul = mul % MOD;
  }
  if (mul == mulgcd) {
    std::cout << "pairwise coprime" << std::endl;
  } else if (gcdnum == 1) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "not coprime" << std::endl;
  }
  return 0;
}
