Untitled

mail@pastecode.io avatar
unknown
plain_text
18 days ago
1.4 kB
0
Indexable
Never
#include <iostream>
#include <math.h>
using namespace std;

/*
long long factorial(int a){
    long long fr = 1;
    while (a > 0) {
        fr *= a;
        a--;
    }
    return fr;
}
*/

/*
double average(int a, int b) {
    double ver = (a + b) / (double)2;
    return ver;
}
*/

/*
int f1(int a) {
    int dist = 0;
    while (a > 0) {
        a /= 10;
        dist += 1;
    }
    cout << dist;
    return dist;
}
*/

/*
double distance(double x1, double x2, double y1, double y2){
    double res;
    double l1, l2;
    l1 = x1 - x2;
    l2 = y1 - y2;
    res = sqrt((l1 * l1) + (l2 * l2));
    cout << res;
    return res;
}
*/

bool one(int a) {
    int i = 2;
    while (i < a) {
        if (a % i == 0) {
            cout << "NO";
            return false;
        }
        else {
            i++;
        }
    }
    cout << "YES";
    return true;
}

int main() {

    /*
    int a;
    cin >> a;
    factorial(a);
    return 0;
    */

    /*
    int a, b;
    cin >> a >> b;
    average(a, b);
    return 0;
    */
    
    /*
    int a;
    cin >> a;
    f1(a);
    return 0;
    */

    /*
    double x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    distance(x1, x2, y1, y2);
    return 0;
    */

    int a;
    cin >> a;
    one(a);
    return 0;
}
Leave a Comment