#include <stdio.h> #include<math.h> int fun(int num){ if(num == 0 || num == 1) return 0; if(num == 2 || num == 3) return 1; // i*i <= num for(int i = 2; i<=(int)sqrt(num); i++){ if(num % i == 0) return 0; } return 1; } int main() { char str[100]; int cnt[26] = {0}; scanf("%s", str); int maxn = 0, minn = 100; for(int i = 0; str[i] != '\0'; i++){ cnt[str[i] - 'a'] ++; } for(int i = 0; i < 26; i++){ if(cnt[i] != 0){ if(cnt[i] > maxn) maxn = cnt[i]; if(cnt[i] < minn) minn = cnt[i]; } } int num = maxn - minn; if(fun(num)) printf("Lucky Word\n%d", num); else printf("No Answer\n0"); return 0; }