{$APPTYPE CONSOLE}

uses
  TestLib, SysUtils;

var
  JAns, PAns: AnsiString;
  i: LongInt;

begin
  JAns:= ouf.ReadWord(blanks, blanks);
  PAns:= ans.ReadWord(blanks, blanks);
  If PAns <> 'NO'
    then
      For i:= 1 to Length(PAns) do
        If not (PAns[i] in ['I', 'V', 'C', 'M', 'D', 'L', 'X'])
          then Quit(_PE, 'Bad symbols in output');
  If JAns <> PAns
    then Quit(_WA, 'Expected ' + JAns + ', but got ' + PAns);
  Quit(_OK, 'Ok!');
end.