Problem Description

Read string s and pattern p with '?' (any char) and '*' (any sequence). Output YES if pattern matches whole string else NO.

Input Format

Two lines: s then p.

Output Format

YES or NO.

Sample Test Case

Input:
adceb *a*b
Output:
YES

Constraints

len(s),len(p)

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next