Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-tub-sonlar-soni

Is it prime

Easy 1000 ms 128 MB 29%
Share

Write a function IsPrime(x) that returns true if the positive integer $x$ is prime and false otherwise. A prime number is a number greater than $1$ that is divisible only by $1$ and itself.

Example 1: IsPrime(7) → true

Example 2: IsPrime(9) → false — $9$ is also divisible by $3$.

Write only the function body.

A number goes into the function IsPrime, which returns true if the number is prime

Input

One line with a positive integer $x$ — the argument of the function.

Output

The value returned by the function: true or false.

Note

$1 \le x \le 10^{6}$

Examples

Input #1
7
Output #1
true
Input #2
9
Output #2
false

Sign in to submit a solution

Signing up is free and takes a minute.