Input: Head: credit card<sep>Tail: purchase java
Answer: Yes