#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void pn(Arg1&& arg1) {
  cout << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void pn(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  pn(args...);
}
template <typename Arg1>
void ps(Arg1&& arg1) {
  cout << arg1 << " ";
}
template <typename Arg1, typename... Args>
void ps(Arg1&& arg1, Args&&... args) {
  cout << arg1 << " ";
  ps(args...);
}
template <typename Arg1>
void read(Arg1&& arg1) {
  cin >> arg1;
}
template <typename Arg1, typename... Args>
void read(Arg1&& arg1, Args&&... args) {
  cin >> arg1;
  read(args...);
}
void LOCAL();
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool coprime(long long a, long long b) { return (gcd(a, b) == 1); }
long long numOfPairs(long long arr[], long long n) {
  long long count = 0;
  for (long long i = 0; i < n - 1; i++)
    for (long long j = i + 1; j < n; j++)
      if (coprime(arr[i], arr[j])) count++;
  return count;
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  clock_t z = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long ar[n];
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
  }
  long long pairs = ((n - 1) * n) / 2;
  if (numOfPairs(ar, n) != pairs) {
    if (findGCD(ar, n) == 1) {
      pn("setwise coprime");
      return 0;
    }
    pn("not coprime");
    return 0;
  }
  pn("pairwise coprime");
  fprintf(stderr, "Total Time: %.7f\n", (double)(clock() - z) / CLOCKS_PER_SEC),
      fflush(stderr);
  return 0;
}
void LOCAL() {}
