cf div2 264 - easy A and B