Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

REMAKE - Remake

Rob and Bob learned lately to play Remake. Rules of this game are as follows: given two words, let say a and b, You should modify word a in such a way, that at the end You will receive word b. Players write on a paper consecutive modifications and than show them to each other and the winner is the player who made less transformations (in case of draw the fastest player win).

There are 3 kinds of modifications:

  • removal of a letter
  • inserting a letter
  • changing one letter into another

Both boys got involved in Remake. Especially Rob who almost always loose (so he's very determined each time they play to win).

Lately Rob is losing all the time and he gave up hope that he can ever manage to win. Therefore, he asked You to help him. He gave You Bob's result and words a, b and You are to tell him if it is worth to try beat Bob. Unfortunately, Bob is always faster than Rob, so in case of draw our friend also loose. It happens, though, that Bob is cheating - if we can ascertain it, Bob is disqualified and Rob wins.

Input

There is unknown number of tests. Each of them consist of two lines. In the first one there are two words: a and b (length(a,b)<1000) and in the second number x, which is amount of modification made by Bob.

Output

For each test one word: YES if Rob is able to win or NO if he's out of luck.

Example

Input:
shortening shortening
0
programming program
4
gramophone programming
9
Output: NO
NO
YES


Added by:Piotr Kąkol
Date:2010-09-14
Time limit:1.113s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS SCM qobi

hide comments
2013-12-18 19:51:06 Piotr KÄ…kol
Whoops. Thanks, fixed. :-)
2013-12-18 17:34:42 Mitch Schwartz
s/Gaweł/Bob/ for English version. :p
2010-09-24 20:37:15 Piotr KÄ…kol
My code which I used to generate the output also passed EDIST. Maybe here are better tests. ;-)

In:
pokiriwned lugatuga
10
Out:
NO

Last edit: 2010-09-24 20:39:50
2010-09-22 14:53:55 :(){ :|: & };:

It passed EDIST in SPOJ classical.
2010-09-15 15:30:30 Piotr KÄ…kol
Will if You wrote it properly. ;-)
2010-09-15 14:41:56 :(){ :|: & };:
Levenshtein won't pass ?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.