LearnPy Hub
← Arena
AdvancedRating 1800

Tiny Regular Expressions

In the pattern, . matches any one character and x* matches zero or more copies of the character x (or of any characters for .*). Does the pattern match the whole text? Print YES or NO.

Input

The text, then the pattern (each ≤ 100 characters; a * always follows a letter or a dot).

Output

YES or NO.

Sample 1

Input
aa
a
Output
NO

Sample 2

Input
aa
a*
Output
YES
solution.py
Output appears here
Tiny Regular Expressions · Python Arena problem · LearnPy Hub