#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <functional>
#include <list>
#include <numeric>
#include <math.h>
#include <cstdlib>
#include <queue>
#include <iterator>
#include <limits>
#include <string>
#include <sstream>
#include <iomanip>
#include <bitset>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <stack>
#include <memory>
#include <deque>
#include <string_view>
#include <random>
#include <chrono>
#include <cstring>

using namespace std;

static int my_speed_up = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }();
using ll = long long; using ull = unsigned long long;
template<class T> using v = vector<T>;
template<class T> using vv = vector<vector<T>>;
template<class T> using vvv = vector<vector<vector<T>>>;
template<class T> using vvvv = vector<vector<vector<vector<T>>>>;
#define for_b(i, b) for (int i = 0; i < int(b); ++i)
#define for_ab(i, a, b) for (int i = a; i < int(b); ++i)
#define what_is(x) cout << #x << " = " << x << endl;
#define what_are(x,y) cout << #x << " = " << x << ", " << #y << " = " << y << endl;
#define pad(x) for_b(i, x) cout << "  ";
#define show_1d(___x) cout << #___x << " = "; for (auto& ___num : ___x) cout << ___num << ", "; cout << endl;
#define show_2d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto ___num : ___row) cout << ___num << ", "; cout << endl; }
#define show_3d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto& ___row2 : ___row) { for (auto ___num : ___row2) cout << ___num << ", "; cout << endl; }cout << endl; }

vv<int> d4 = {{1,0},{-1,0},{0,1},{0,-1}};
vv<int> d8 = {{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
bool is_valid_pos(const vv<int>& tb, int x, int y) {
    return x >= 0 && x < tb.size() && y >= 0 && y < tb[0].size();
}

v<int> primes;
unordered_set<int> primes_set;


bool is_prime(int num)
{
    int sq = sqrt(num) + 1;
    
    for_ab(i, 2, sq)
        if (num % i == 0)
            return false;
    return true;
}
    

bool get_factors(unordered_set<int>& factors, int num)
{
    if (primes_set.find(num) != primes_set.end())
    {
        if (factors.find(num) != factors.end()) return false;
        factors.insert(num);
        return true;
    }
    
    for (auto prime : primes)
    {
        if (prime > num) break;
        bool is_devide = num % prime == 0;
        if (is_devide)
        {
            if (factors.find(prime) != factors.end()) return false;
            factors.insert(prime);
        }
        while (num % prime == 0)
            num /= prime;
        if (is_devide && primes_set.find(num) != primes_set.end())
        {
            if (factors.find(num) != factors.end()) return false;
            factors.insert(num);
            return true;
        }
        
    }
    return true;
}


int main()
{
    for_ab(i,2,1000001)
        if (is_prime(i))
        {
            primes.push_back(i);
            primes_set.insert(i);
        }
    
    int N;
    cin >> N;
    
    v<int> tb(N);
    for_b(i,N)
        cin >> tb[i];
        
    bool is_pairwise = true;
    unordered_set<int> factors;
    if (is_pairwise)
    for (auto num : tb)
    {
        if (num > 1)
        if (!get_factors(factors, num))
        {
            is_pairwise = false;
            break;
        }
    }
    if (is_pairwise)
    {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    
    int cur_gcd = tb[0];
    for (auto num : tb)
    {
        cur_gcd = gcd(cur_gcd, num);
        if (cur_gcd == 1)
            break;
    }
        
    if (cur_gcd == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
    
    return 0;
}


Measured memory_bytes: 10856