A prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not.

The next prime number after x is the smallest prime number greater than x. For example, the next prime number after 2 is 3, and the next prime number after 3 is 5. Note that there is exactly one next prime number after each number. So 5 is not the next prime number for 2.

One cold April morning Panoramix predicted that soon Kakofonix will break free from his straitjacket, and this will be a black day for the residents of the Gallic countryside.

Panoramix's prophecy tells that if some day Asterix and Obelix beat exactly x Roman soldiers, where x is a prime number, and next day they beat exactly y Roman soldiers, where y is the next prime number after x, then it's time to wait for Armageddon, for nothing can shut Kakofonix up while he sings his infernal song.

Yesterday the Gauls beat n Roman soldiers and it turned out that the number n was prime! Today their victims were a troop of m Romans (m > n). Determine whether the Gauls should wait for the black day after today's victory of Asterix and Obelix?

Input

The first and only input line contains two positive integers — n and m (2 ≤ n < m ≤ 50). It is guaranteed that n is prime.

Pretests contain all the cases with restrictions 2 ≤ n < m ≤ 4.

Output

Print YES, if m is the next prime number after n, or NO otherwise.

Examples

Input

3 5


Output

YES

Input

7 11


Output

YES

Input

7 9


Output

NO
import sys
from Queue import Queue
from sets import Set

class pythonin:
    _data = []
    _ldata = []
    _cur = 0
    _lcur = 0
    
    def __init__(self):
        while True:
            try: self._ldata.append(raw_input())
            except EOFError : break

    def _convert(self):
        if self._lcur == len(self._ldata) : return
        l = self._ldata[self._lcur].split(" ")
        self._lcur += 1
        for x in l :
            if x != "" and x != "\t" :
                self._data.append(x)
        
    def eof(self) : 
        self._convert()
        return self._cur == len(self._data)

    def nextToken(self) :
        if self.eof() : return
        self._cur += 1
        return self._data[self._cur - 1]
    
    def nextInt(self) :
        return int(self.nextToken())
    
    def nextFloat(self) :
        return float(self.nextToken())
    
    def nextLine(self) :
        if self._lcur == len(self._ldata) : return 
        self._lcur += 1
        return self._ldata[self._lcur - 1]
    
#sys.stdin = open("input.txt", "r")
#sys.stdout = open("output.txt", "w")

pin = pythonin()

a = pin.nextInt()
b = pin.nextInt()

def primes(l, r) :
    used = [False for i in xrange(0, r)]
    used[0] = used[1] = True
    for i in xrange(0, r) :
        if not used[i]:
            for j in xrange(i * i, r, i) :
                used[j] = True

    for i in xrange(l, r) :
        if not used[i] : 
            yield i
         

pr = [x for x in primes(a, b + 1)]

if len(pr) == 2 and pr[0] == a and pr[1] == b :
    print "YES"
else: print "NO"

#print ("Press any key to continue")
#raw_input() 
