#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    long long temp = a;
    a = b;
    b = temp;
  }
  return a;
}
int main() {
  int n;
  long long sol = 0;
  scanf("%d", &n);
  long long arr[1000001];
  scanf("%lld", &arr[0]);
  long long tot = arr[0];
  for (int i = 1; i < n; i++) {
    scanf("%lld", &arr[i]);
    tot = gcd(tot, arr[i]);
  }
  if (tot != 1) {
    printf("not coprime\n");
    return 0;
  }
  vector<long long> prime = {2};
  for (long long i = 3; i < 1000; i += 2) {
    bool isprime = true;
    for (int j = 0; j < prime.size() && prime[j] * prime[j] <= i; j++) {
      if (!(i % prime[j])) {
        isprime = false;
        break;
      }
    }
    if (isprime) {
      prime.push_back(i);
    }
  }
  set<long long> list;
  for (int i = 0; i < n; i++) {
    long long temp = arr[i];
    while (temp != 1) {
      for (int j = 0; j < prime.size() && prime[j] <= temp; j++) {
        if (!(temp % prime[j])) {
          set<long long>::iterator ret = list.find(prime[j]);
          if (ret != list.end()) {
            printf("setwise coprime\n");
            return 0;
          }
          list.insert(prime[j]);
          while (!(temp % prime[j])) {
            temp /= prime[j];
          }
        }
      }
      if (temp != 1) {
        set<long long>::iterator ret = list.find(temp);
        if (ret != list.end()) {
          printf("setwise coprime\n");
          return 0;
        }
        list.insert(temp);
      }
    }
  }
  printf("pairwise coprime\n");
  return 0;
}
