PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000119. Trừ lặp lại cùng một số nguyên tố (Prime Subtraction)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Trừ lặp lại cùng một số nguyên tố (Prime Subtraction)

Prime Subtraction

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given two integers xx and yy with x>yx>y, choose one prime number pp and subtract that same pp from xx a nonnegative integer number of times.

Determine whether the final value can equal yy. You may not change pp between subtractions.

Input

One line containing integers xx and yy, in that order.

Output

Print YES if repeated subtraction of one fixed prime can transform xx into yy; otherwise print NO.

Subtasks

  • Subtask 1 (20 points): 1≤y<x≤1031\le y<x\le10^3.
  • Subtask 2 (30 points): 1≤y<x≤1091\le y<x\le10^9.
  • Subtask 3 (50 points): 1≤y<x≤10181\le y<x\le10^{18}.

Examples

Input

42 32

Output

YES

Explanation

The difference is 42−32=1042-32=10. Choose the prime p=5p=5 and subtract twice: 42→37→3242\to37\to32. The same prime is used each time, so the answer is YES. If the difference were 11, no prime subtraction could realize it, since every prime is at least 22.