import math


class Maths:
    def is_prime(self, num):
        if num < 0:
            raise(ValueError())
        if num == 0:
            return False
        if num <=3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True

    def add(self, a, b):
        return a + b

    def divide(self, a, b):
        return a/b

    def multiply(self, a, b):
        return a * b

    def power(self, a, b):
        '''calculates a ^ b'''
        prod = 1
        for i in range(abs(b)):
            prod *= a
        return prod

    def factorial(self, n):
        '''calculates n! = 1 * 2 * 3 * ... * n'''
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n+1):
                prod *= i
            prod = prod*-1
        else:
            for i in range(1, n+1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0

    def sub_and_print(self, a, b):
        print('result is : {}'.format(a-b))


ad02bab9232b5a20e2f5a37fc9b3e8f0e12a92a0
<mask token>


class Maths:

    def is_prime(self, num):
        if num < 0:
            raise ValueError()
        if num == 0:
            return False
        if num <= 3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True
    <mask token>

    def divide(self, a, b):
        return a / b

    def multiply(self, a, b):
        return a * b
    <mask token>

    def factorial(self, n):
        """calculates n! = 1 * 2 * 3 * ... * n"""
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n + 1):
                prod *= i
            prod = prod * -1
        else:
            for i in range(1, n + 1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0
    <mask token>

<mask token>


class Maths:

    def is_prime(self, num):
        if num < 0:
            raise ValueError()
        if num == 0:
            return False
        if num <= 3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True
    <mask token>

    def divide(self, a, b):
        return a / b

    def multiply(self, a, b):
        return a * b
    <mask token>

    def factorial(self, n):
        """calculates n! = 1 * 2 * 3 * ... * n"""
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n + 1):
                prod *= i
            prod = prod * -1
        else:
            for i in range(1, n + 1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0

    def sub_and_print(self, a, b):
        print('result is : {}'.format(a - b))

<mask token>


class Maths:

    def is_prime(self, num):
        if num < 0:
            raise ValueError()
        if num == 0:
            return False
        if num <= 3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True
    <mask token>

    def divide(self, a, b):
        return a / b

    def multiply(self, a, b):
        return a * b

    def power(self, a, b):
        """calculates a ^ b"""
        prod = 1
        for i in range(abs(b)):
            prod *= a
        return prod

    def factorial(self, n):
        """calculates n! = 1 * 2 * 3 * ... * n"""
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n + 1):
                prod *= i
            prod = prod * -1
        else:
            for i in range(1, n + 1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0

    def sub_and_print(self, a, b):
        print('result is : {}'.format(a - b))

import math


class Maths:

    def is_prime(self, num):
        if num < 0:
            raise ValueError()
        if num == 0:
            return False
        if num <= 3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True

    def add(self, a, b):
        return a + b

    def divide(self, a, b):
        return a / b

    def multiply(self, a, b):
        return a * b

    def power(self, a, b):
        """calculates a ^ b"""
        prod = 1
        for i in range(abs(b)):
            prod *= a
        return prod

    def factorial(self, n):
        """calculates n! = 1 * 2 * 3 * ... * n"""
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n + 1):
                prod *= i
            prod = prod * -1
        else:
            for i in range(1, n + 1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0

    def sub_and_print(self, a, b):
        print('result is : {}'.format(a - b))

import math


class Maths:
    def is_prime(self, num):
        if num < 0:
            raise(ValueError())
        if num == 0:
            return False
        if num <=3:
            return True
        for i in range(2, num):
            if num % i == 0:
                return False
        return True

    def add(self, a, b):
        return a + b

    def divide(self, a, b):
        return a/b

    def multiply(self, a, b):
        return a * b

    def power(self, a, b):
        '''calculates a ^ b'''
        prod = 1
        for i in range(abs(b)):
            prod *= a
        return prod

    def factorial(self, n):
        '''calculates n! = 1 * 2 * 3 * ... * n'''
        prod = 1
        if n < 0:
            n = abs(n)
            for i in range(1, n+1):
                prod *= i
            prod = prod*-1
        else:
            for i in range(1, n+1):
                prod *= i
        return prod

    def is_even(self, a):
        return math.floor(a % 2) == 0

    def sub_and_print(self, a, b):
        print('result is : {}'.format(a-b))

