#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"from fractions import*;_,X,*x=map(int,open(0).read().split());s,*x=[abs(X-t)for t in x]\n"
"for t in x:s=gcd(s,t)\n"
"print(s)\n"
"\"";
  system(s);
  return 0;
}            