#include <bits/stdc++.h>
using namespace std;

#define int long long int
#define pb push_back
#define pi pair<int, int>
#define fir first
#define sec second
#define MAXN 1000001
#define mod 1000000007

int n;
vector<int> v;

int modpow(int x, int y)
{
  int z = 1;
  while (y)
  {
    if (y & 1)
      z = (z * x) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return z;
}
int inverse(int x)
{
  return modpow(x, mod - 2);
}
int divide(int x, int y)
{
  return (x * inverse(y)) % mod;
}
int lcm(int a, int b)
{
  return (divide((a * b) % mod, __gcd(a, b) % mod)) % mod;
}
signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  v.resize(n);
  for (int i = 0; i < n; i++)
    cin >> v[i];
  int gcdd = v[0];
  for (int i = 0; i < n; i++)
    gcdd = __gcd(gcdd, v[i]);
  if (gcdd != 1)
  {
    cout << "not coprime\n";
    return 0;
  }
  int lcmm = v[0], prod = v[0];
  for (int i = 1; i < n; i++)
  {
    lcmm = lcm(v[i], lcmm) % mod;
    prod = (v[i] * prod) % mod;
  }
  (lcmm == prod) ? cout << "pairwise coprime\n" : cout << "setwise coprime\n";
  return 0;
}
