zero = int(False)
one = int(True)
two = one + one
ten_thousand = int(str(one)+str(zero)*(two+two))

def mod_is_zero(x, y):
    if y == zero:
        return False
    i = y
    while i < x:
        i += y
    return (i == x)

def is_prime(x):
    if (x <= one) or ((x >> one << one) == x and x != two):  # check if less than two or even
        return False
    i = two
    half_x = (x >> one)
    while i < half_x:
        if mod_is_zero(x, i):
            return False
        i += one
    return True

i = one
while i < ten_thousand:
    print('{}: {}'.format(i, is_prime(i)))
    i += one