Find two distinct prime numbers in the inclusive interval from left to right whose difference is as small as possible. A prime is an integer greater than 1 divisible only by 1 and itself. Return the pair in increasing order. If several pairs have the same minimum difference, choose the pair with the smaller first number. If the interval contains fewer than two primes, return [-1,-1].
Example 1:
Input: left = 1
right = 5
Output: [2,3]Explanation: The primes are 2, 3, and 5. The pair [2,3] has difference 1, smaller than every other pair. The number 1 is not prime.
Example 2:
Input: left = 14
right = 16
Output: [-1,-1]Explanation: There are no primes in this interval, so no pair is available.
Example 3:
Input: left = 5
right = 13
Output: [5,7]Explanation: Both [5,7] and [11,13] have difference 2. Choose [5,7] because its first number is smaller.
Constraints:
1 <= left <= right <= 1000000