Example challenge

In this particular problem, the user has to check whether a given number x (0 ≤ x ≤ 106) is prime or not and print the answer accordingly.

Exemplary input no. 1
  5
Exemplary output no. 1
  YES

Exemplary input no. 2
  6
Exemplary output no. 2
  NO

Sample solutions


function foo(items) { var x = "All this is syntax highlighted"; return x; }