{"problem":{"name":"Skip","description":{"content":"There are $N$ cities on a number line. The $i$\\-th city is located at coordinate $x_i$. Your objective is to visit all these cities at least once. In order to do so, you will first set a positive inte","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc109_c"},"statements":[{"statement_type":"Markdown","content":"There are $N$ cities on a number line. The $i$\\-th city is located at coordinate $x_i$.\nYour objective is to visit all these cities at least once.\nIn order to do so, you will first set a positive integer $D$.\nThen, you will depart from coordinate $X$ and perform Move $1$ and Move $2$ below, as many times as you like:\n\n*   Move $1$: travel from coordinate $y$ to coordinate $y + D$.\n*   Move $2$: travel from coordinate $y$ to coordinate $y - D$.\n\nFind the maximum value of $D$ that enables you to visit all the cities.\nHere, to visit a city is to travel to the coordinate where that city is located.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq X \\leq 10^9$\n*   $1 \\leq x_i \\leq 10^9$\n*   $x_i$ are all different.\n*   $x_1, x_2, ..., x_N \\neq X$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $X$\n$x_1$ $x_2$ $...$ $x_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc109_c","tags":[],"sample_group":[["3 3\n1 7 11","2\n\nSetting $D = 2$ enables you to visit all the cities as follows, and this is the maximum value of such $D$.\n\n*   Perform Move $2$ to travel to coordinate $1$.\n*   Perform Move $1$ to travel to coordinate $3$.\n*   Perform Move $1$ to travel to coordinate $5$.\n*   Perform Move $1$ to travel to coordinate $7$.\n*   Perform Move $1$ to travel to coordinate $9$.\n*   Perform Move $1$ to travel to coordinate $11$."],["3 81\n33 105 57","24"],["1 1\n1000000000","999999999"]],"created_at":"2026-03-03 11:01:13"}}