Hi Wojciech,
The way I would do this is with the MathObjects MultiAnswer evaluator, which lets one group a set of answer blanks and decide how to grade them accordingly. A (hopefully good) place to start exploring this is the problem techniques documentation page: http://webwork.maa.org/wiki/MultiAnswerProblems .
Gavin
WeBWorK Main Forum
Comparing two seperate fill-in-the-blank answers
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day