#include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define lb long double #define mod 1000000007 #define inf 9000000000000000000LL #define N 100000 using namespace std; ll read() { ll x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } bool a[N+5]; int p[N+5]; void primelist() { a[0]=a[1]=1; for(int i=2;i=1;i--) if(x%i==0)return i; } int solve2() { int ans2=0; for(int i=1;i*d