to check whether prime or not