#include <bits/stdc++.h>
using namespace std;
int arr[1000005];
int Sieve() {
  int n = 1000000;
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    int count = 0;
    if (prime[p] == true) {
      for (int i = p; i <= n; i += p) {
        if (arr[i] == 1) {
          count++;
        }
        prime[i] = false;
      }
    }
    if (count == 2) {
      return 0;
    }
  }
  return 1;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int a[], int n) {
  int result = a[0];
  for (int i = 1; i < n; i++) {
    result = gcd(a[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio;
  cin.tie(NULL);
  int i, j, k, m, n, t;
  cin >> n;
  int a[n];
  memset(arr, 0, sizeof(arr));
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    arr[a[i]] = 1;
  }
  int gcd = findGCD(a, n);
  int p = Sieve();
  if (p == 0) {
    cout << "setwise coprime";
    return 0;
  }
  if (gcd == 1) {
    cout << "pairwise coprime";
    return 0;
  }
  cout << "not coprime";
}
