403067: GYM100989 E Accepted Passwords

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Accepted Passwordstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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.

Input

The 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.

Output

Print yes if the entered password should be accepted according to Islam, otherwise print no.

ExamplesInput
AgentMahone
IslamIsMahone
Output
no
Input
ofmahone
ofmahome
Output
yes
Input
algorithms
algorthms
Output
yes
Input
Mahone
mahonE
Output
no

加入题单

算法标签: