#include <bits/stdc++.h>
using namespace std;
struct pair_hash {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2> &p) const {
    auto h1 = hash<T1>{}(p.first);
    auto h2 = hash<T2>{}(p.second);
    return h1 ^ h2;
  }
};
using Vote = pair<long long int, long long int>;
using Unordered_map = unordered_map<Vote, int, pair_hash>;
const int mod = 998244353;
const int mod2 = 1000000007;
bool prime[2000005];
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
void Sieve() {
  int n = 2000004;
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  prime[0] = false;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  ;
  int array_gcd = findGCD(a, n);
  if (array_gcd != 1)
    cout << "not coprime\n";
  else {
    Sieve();
    int ok = 1;
    unordered_map<int, bool> check_prime;
    for (long long int i = 0; i < n; i++) {
      if (a[i] % 2 == 0) {
        if (check_prime[2]) {
          ok = 0;
          break;
        }
        check_prime[2] = 1;
        int val = a[i] / 2;
        if (val != 2 && prime[val]) {
          if (check_prime[val]) {
            ok = 0;
            break;
          }
          check_prime[val] = 1;
        }
      }
      for (int j = 1; j <= sqrt(a[i]); j += 2) {
        if (a[i] % j == 0) {
          if (j != a[i] / j) {
            if (prime[j]) {
              if (check_prime[j]) {
                ok = 0;
                break;
              }
              check_prime[j] = 1;
            }
            if (prime[a[i] / j]) {
              if (check_prime[a[i] / j]) {
                ok = 0;
                break;
              }
              check_prime[a[i] / j] = 1;
            }
          } else {
            if (prime[j]) {
              if (check_prime[j]) {
                ok = 0;
                break;
              }
              check_prime[j] = 1;
            }
          }
        }
      }
    }
    if (ok)
      cout << "pairwise coprime\n";
    else
      cout << "setwise coprime\n";
  }
}
