#include <bits/stdc++.h>
using namespace std;
long long maxl(long long a, long long b) { return ((a < b) ? b : a); }
long long minl(long long a, long long b) { return ((a > b) ? b : a); }
long long gcd(long long A, long long B) {
  if (B == 0) return A;
  return gcd(B, A % B);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  int *dp = new int[1000001];
  bool *sieve = new bool[1000001];
  for (int i = 0; i < 1e6 + 1; i++) {
    dp[i] = 0;
    sieve[i] = false;
  }
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    dp[arr[i]]++;
  }
  bool ans = true;
  for (int i = 2; i < 1e6 + 1; i++) {
    int count = 0;
    if (sieve[i]) continue;
    count = count + dp[i];
    sieve[i] = true;
    for (long long j = (long long)i * i; j < 1e6 + 1; j = j + i) {
      if (sieve[j]) continue;
      sieve[j] = true;
      count = count + dp[j];
    }
    if (count > 1) {
      ans = false;
      break;
    }
  }
  if (ans) {
    cout << "pairwise coprime\n";
  } else {
    ans = false;
    long long GCD = arr[0];
    for (int i = 1; i < n; i++) {
      GCD = gcd(maxl(GCD, arr[i]), minl(GCD, arr[i]));
    }
    if (GCD == 1) {
      ans = true;
    }
    if (ans) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
}
