Vasya's got a birthday coming up and his mom decided to give him an array of positive integers a of length n.

Vasya thinks that an array's beauty is the greatest common divisor of all its elements. His mom, of course, wants to give him as beautiful an array as possible (with largest possible beauty). Unfortunately, the shop has only one array a left. On the plus side, the seller said that he could decrease some numbers in the array (no more than by k for each number).

The seller can obtain array b from array a if the following conditions hold: b_{i} > 0; 0 ≤ a_{i} - b_{i} ≤ k for all 1 ≤ i ≤ n.

Help mom find the maximum possible beauty of the array she will give to Vasya (that seller can obtain).


-----Input-----

The first line contains two integers n and k (1 ≤ n ≤ 3·10^5; 1 ≤ k ≤ 10^6). The second line contains n integers a_{i} (1 ≤ a_{i} ≤ 10^6) — array a.


-----Output-----

In the single line print a single number — the maximum possible beauty of the resulting array.


-----Examples-----
Input
6 1
3 6 10 12 13 16

Output
3

Input
5 3
8 21 52 15 77

Output
7



-----Note-----

In the first sample we can obtain the array:

3 6 9 12 12 15

In the second sample we can obtain the next array:

7 21 49 14 77

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\n\nline = sys.stdin.readline()\nn, k = [int(i) for i in line.split()]\nline = sys.stdin.readline()\n_min = int(1e7)\n_max = 0\naccum = [0] * int(1e6+2)\nfor i in line.split():\n    j = int(i)\n    accum[j]+=1\n    if j > _max:\n        _max = j\n    if j < _min:\n        _min = j\n\nfor i in range(1, _max+1):\n    accum[i] += accum[i-1]\n# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14\nif k >= _min-1:\n    print(_min)\n    return\ngcd = 2;\nfor i in range(_min, 1, -1):\n    div = True\n    j = 2*i\n    comp = i-k\n    while div:\n        if j-1 <= _max:\n            div = accum[j-1] == accum[j-comp]\n        elif j-comp <= _max:\n            div = accum[_max] == accum[j-comp]\n        else:\n            break\n        j+=i\n    if div:\n        gcd = i\n        break\n\nprint(gcd)\n\n# 1494021276904\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: