cf 269 div2 - A and B