int main() {
    int n, m = 0;
    while (scanf("%d", &n) != EOF) {
        m++;
        if (m != 1) {
            int count = 0;
            for (int i = 1; i <= n; i++) {
                if (n % i == 0) count++;
            }
            if (count == 2) printf("true\n");
            else printf("false\n");
        }
    }
    return 0;
}