LearnPy Hub
← Arena
IntermediateRating 1200

Same Pattern

Two strings follow the same pattern if letters of the first can be replaced one-to-one to get the second (egg/add yes, foo/bar no). Print YES or NO.

Input

Two lines of equal length.

Output

YES or NO.

Sample 1

Input
egg
add
Output
YES

Sample 2

Input
foo
bar
Output
NO
solution.py
Output appears here
Same Pattern · Python Arena problem · LearnPy Hub