print<>=~/^(\w )*\w?$/?Yes:No