1407 - DS_18_CHEN_HW1 Scoreboard

Time

2018/03/12 12:00:00 2018/03/26 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11844 Palindrome

11844 - Palindrome   

Description

The definition of palindrome from Wiki is "A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward, such as madam or racecar."  So by definition, the empty string, all strings containing only 1 character, and containing 2 equal characters are palindromes. 

In this problem, we will give you a string s, and a interger n. You can delete the string at most n charectors. Please tell use whether you can make the string become palindromes.

Input

The input consists of multiple lines.

First line is a interger n. n>=0

The following line contains a string. 

Output

For each string, output "Yes" if it's a palindrome or "No" if it's not a palindrome.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss