403067: GYM100989 E Accepted Passwords
Description
Islam is usually in a hurry. He often types his passwords incorrectly. He hates retyping his password several times whenever he tries to login, especially that his passwords are usually very long. He believes that websites should be tolerant with very long passwords. In other words, he believes that if a password is very long, and there is only one mistake in the password, the website should allow the user to login.
Your task is to check if an entered password should be accepted according to Islam, or not. The entered password will be accepted if it matches the user’s password, or if the user’s password length is at least 8 characters and the user made a mistake with only one character (either replaced it with a wrong character or dropped it).
Given the user’s password, and the entered password, determine if the entered password should be accepted according to Islam.
InputThe first line of input contains the user’s password.
The second line of input contains the entered password.
Both strings contain only lowercase and uppercase English letters.
The length of each string is at least 1 and at most 100.
OutputPrint yes if the entered password should be accepted according to Islam, otherwise print no.
ExamplesInputAgentMahoneOutput
IslamIsMahone
noInput
ofmahoneOutput
ofmahome
yesInput
algorithmsOutput
algorthms
yesInput
MahoneOutput
mahonE
no