/************************************************************************
 AUTH : krishna-3249 
 DATE : 8/29/20
 TIME : 6:12 PM

 Everyone’s a whore, Grace. We just sell different parts of ourselves.

 Simple can be harder than complex: 
 you have to work hard to get your thinking clean to make it simple. 
 But it's worth it in the end 
 because once you get there, you can move mountains.
 ************************************************************************/

import java.lang.*;
import java.io.*;
import java.util.*;

public class Main {

    private static final long MOD = 1_000_000_000 + 7;

    private long power(long base, long exponent) {
        long res = 1;
        while (exponent > 0) {
            if ((base & 1) == 1) {
                res = (res * base) % MOD;
                exponent--;
            } else {
                res = (res * res) % MOD;
                exponent >>= 1;
            }
        }
        return res;
    }

    private long inverseMod(long number) {
        return power(number, MOD - 2);
    }

    private int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    private long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    private List<Integer> sieve(int N) {
        boolean[] mark = new boolean[N+1];
        mark[0] = mark[1] = true;
        for (int i=2;i*i<=N;i++) {
            if (!mark[i]) {
                for (int j=2*i;j<=N;j+=i) {
                    mark[j] = true;
                }
            }
        }
        List<Integer> primes = new ArrayList<>();
        for (int i=0;i<=N;i++) {
            if (!mark[i]) {
                primes.add(i);
            }
        }
        return primes;
    }
    public void solve(Read input, Write output) throws Exception {
        List<Integer> primes = sieve(1000);
        int N = input.readInt();
        int[] arr = input.readIntArray(N);
        int allgcd = -1;
        for (int i=1;i<N;i++) {
            if (i==1) {
                allgcd = gcd(arr[i], arr[i-1]);
                continue;
            }
            allgcd = gcd(arr[i], allgcd);
            if (allgcd==1) {
                break;
            }
        }
        int[] factorcount = new int[1000001];
        boolean found = true;
        for (int i=0;i<N;i++) {
            if (arr[i]==1) {
                continue;
            }
            int val = arr[i];
            for (int j=0;j<primes.size();j++) {
                int prime = primes.get(j);
                boolean taken = false;
                while (val>1) {
                    if (val%prime==0) {
                        val = val/prime;
                        taken = true;
                    } else {
                        break;
                    }
                }
                if (taken) {
                    if (factorcount[prime]+1>1) {
                        found = false;
                        break;
                    } else {
                        factorcount[prime]++;
                    }
                }
            }
            if (val>1) {
                if (factorcount[val]+1>1) {
                    found = false;
                    break;
                } else {
                    factorcount[val]++;
                }
            }
            if (!found) {
                break;
            }
        }
        if (found) {
            output.printLine("pairwise coprime");
        } else {
            if (allgcd==1) {
                output.printLine("setwise coprime");
            } else {
                output.printLine("not coprime");
            }
        }
    }

    public static void main(String[] args) throws Exception {
        Read input = new Read();
        Write output = new Write();
        Main D = new Main();
        D.solve(input, output);
        output.flush();
        output.close();
    }

    // java fast io reader and writer
    // taken from various sources and customized

    static class Read {

        private byte[] buffer = new byte[10 * 1024];
        private int index;
        private InputStream input_stream;
        private int total;

        public Read() {
            input_stream = System.in;
        }

        public int read() throws IOException {
            if (total < 0)
                throw new InputMismatchException();
            if (index >= total) {
                index = 0;
                total = input_stream.read(buffer);
                if (total <= 0)
                    return -1;
            }
            return buffer[index++];
        }

        public long readLong() throws IOException {
            long number = 0;
            int n = read();
            while (isWhiteSpace(n))
                n = read();
            long neg = 1l;
            if (n == '-') {
                neg = -1l;
                n = read();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    number *= 10l;
                    number += (long) (n - '0');
                    n = read();
                } else throw new InputMismatchException();
            }
            return neg * number;
        }

        public int readInt() throws IOException {
            int integer = 0;
            int n = read();
            while (isWhiteSpace(n))
                n = read();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = read();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = read();
                } else throw new InputMismatchException();
            }
            return neg * integer;
        }

        public double readDouble() throws IOException {
            double doub = 0;
            int n = read();
            while (isWhiteSpace(n))
                n = read();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = read();
            }
            while (!isWhiteSpace(n) && n != '.') {
                if (n >= '0' && n <= '9') {
                    doub *= 10;
                    doub += n - '0';
                    n = read();
                } else throw new InputMismatchException();
            }

            if (n == '.') {
                n = read();
                double temp = 1;
                while (!isWhiteSpace(n)) {
                    if (n >= '0' && n <= '9') {
                        temp /= 10;
                        doub += (n - '0') * temp;
                        n = read();
                    } else throw new InputMismatchException();
                }
            }
            return doub * neg;
        }

        public String readString() throws IOException {
            StringBuilder sb = new StringBuilder();
            int n = read();
            while (isWhiteSpace(n))
                n = read();
            while (!isWhiteSpace(n)) {
                sb.append((char) n);
                n = read();
            }
            return sb.toString();
        }

        public List<Double> readDoubleList(int size) throws IOException {
            List<Double> res = new ArrayList<>();
            for (int i = 0; i < size; i++) {
                res.add(this.readDouble());
            }
            return res;
        }

        public double[] readDoubleArray(int size) throws IOException {
            double[] res = new double[size];
            for (int i = 0; i < size; i++) {
                res[i] = this.readDouble();
            }
            return res;
        }

        public List<String> readStringList(int size) throws IOException {
            List<String> res = new ArrayList<>();
            for (int i = 0; i < size; i++) {
                res.add(this.readString());
            }
            return res;
        }

        public String[] readStringArray(int size) throws IOException {
            String[] res = new String[size];
            for (int i = 0; i < size; i++) {
                res[i] = this.readString();
            }
            return res;
        }

        public List<Integer> readIntList(int size) throws IOException {
            List<Integer> res = new ArrayList<>();
            for (int i = 0; i < size; i++) {
                res.add(this.readInt());
            }
            return res;
        }

        public List<Long> readLongList(int size) throws IOException {
            List<Long> res = new ArrayList<>();
            for (int i = 0; i < size; i++) {
                res.add(this.readLong());
            }
            return res;
        }

        public int[] readIntArray(int size) throws IOException {
            int[] res = new int[size];
            for (int i = 0; i < size; i++) {
                res[i] = this.readInt();
            }
            return res;
        }

        public long[] readLongArray(int size) throws IOException {
            long[] res = new long[size];
            for (int i = 0; i < size; i++) {
                res[i] = this.readLong();
            }
            return res;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                return true;
            return false;
        }
    }

    static class Write {

        private final BufferedWriter bw;

        public Write() {
            bw = new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void print(Object str) throws IOException {
            bw.append(str + "");
        }

        public void printLine(Object str) throws IOException {
            print(str);
            bw.append("\n");
        }

        public void close() throws IOException {
            bw.close();
        }

        public void flush() throws IOException {
            bw.flush();
        }
    }
}

Measured memory_bytes: 44576