#include using namespace std; int main(){ long long int K,N; cin >> K >> N; vector P(0); for(long long int i=K;i<=N;i++){ if(i == 1) continue; bool flag = true; for(long long int j=2;j*j<=i;j++){ if(i%j == 0){ flag = false; break; } } if(flag) P.push_back(i); } vector A(P.size()); for(int i=0;i= 10){ long long int S = 0; while(A[i] > 0){ S += A[i]%10; A[i] /= 10; } A[i] = S; } } for(int i=9;i>=1;i--){ int ans = -1; for(int j=0;j<(int)P.size()-i+1;j++){ vector used(10,false); bool ok = true; for(int k=j;k