According to A.K. Warder's grammar book, the relative pronoun should
agree with the word it denotes in gender and number. If so why in the
following sentence the relative pronoun is "ya.m" rather than "yo".
Did ancient grammarians explain this before?