solve restricted-prime