f(x) checks if the input word is a city. If the input word is a city, then the function returns "Yes", otherwise it returns "No".

