#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
bool prime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool isPerfectSquare(long long int x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
bool subsequence_checker(string str1, string str2, long long int m,
                         long long int n) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (str1[m - 1] == str2[n - 1])
    return subsequence_checker(str1, str2, m - 1, n - 1);
  return subsequence_checker(str1, str2, m, n - 1);
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) return a.second < b.second;
  return (a.first > b.first);
}
long long int gcd(long long int p, long long int q) {
  if (p % q == 0) return q;
  return gcd(q, p % q);
}
long long int sie = 1e6 + 2;
void solve() {
  long long int div[sie];
  long long int n = 1000000;
  for (long long int i = 0; i <= n; i += 2) {
    div[i] = 2;
  }
  for (long long int i = 3; i <= n; i += 2) {
    for (long long int j = i; j <= n; j += i) {
      div[j] = i;
    }
  }
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int g = a[0];
  long long int e = 0;
  if (a[0] % 2 == 0) e++;
  for (long long int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
    if (a[i] % 2 == 0) {
      e++;
    }
  }
  if (g > 1) {
    cout << "not coprime";
    return;
  }
  if (e > 1) {
    cout << "setwise coprime";
    return;
  }
  map<long long int, long long int> m;
  for (long long int i = 0; i < n; i++) {
    m[div[a[i]]]++;
    if (m[div[a[i]]] > 1) {
      cout << "setwise coprime";
      return;
    }
  }
  cout << "pairwise coprime";
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
