#include <bits/stdc++.h>
using namespace std;
long long int GCD(long long int a, long long int b) {
  if (a == 0) return b;
  return GCD(b % a, a);
}
long long int LCM(long long int a, long long int b) {
  return (a * b) / GCD(a, b);
}
int checkPairwiseCoPrime(long long int A[], long long int n) {
  long long int prod = 1;
  long long int lcm = 1;
  for (int i = 0; i < n; i++) {
    prod *= A[i];
    lcm = LCM(A[i], lcm);
  }
  if (prod == lcm)
    return 1;
  else
    return 0;
}
int findGCD(long long int arr[], long long int n) {
  long long int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = GCD(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (checkPairwiseCoPrime(a, n) == 1)
    cout << "pairwise coprime\n";
  else if (findGCD(a, n) == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
