a, b for codeforce added