{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThe art of photography is another Ira\u0027s hobby. Her works occupy a worthy place on the pages of DeviantArt. Every Internet user can freely go to her gallery and \"Like\" image(s) he liked, increasing rating of those image(s) by \u003cstrong\u003e1\u003c/strong\u003e.\u003c/p\u003e\n\n\u003cp\u003e--- \u003cem\u003eMmm! Not a bad job for a bot\u003c/em\u003e.\u003c/p\u003e\n\n\u003cp\u003eThe essence of the bot consisted in the following: a specially created user \"Likes\" \u003cstrong\u003eK\u003c/strong\u003e photos, starting with \u003cstrong\u003eI\u003c/strong\u003e-th, in increments of \u003cstrong\u003eA\u003c/strong\u003e. The second bot was created to monitor results. It checks the sum of ratings for \u003cstrong\u003eL\u003c/strong\u003e pictures, starting with \u003cstrong\u003eJ\u003c/strong\u003e-th, in increments of \u003cstrong\u003eB\u003c/strong\u003e. Photographs are numbered from \u003cstrong\u003e0\u003c/strong\u003e.\u003c/p\u003e\n\n\u003cp\u003eBots work independently until the administration of DeviantArt will notice the cheating with \"Likes\" and bans both Anonymouses.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eFirst line of input \u001cfile contains four integers \u003cstrong\u003eN\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e ≤ \u003cstrong\u003e10^5\u003c/strong\u003e), \u003cstrong\u003eA\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eA\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e), \u003cstrong\u003eB\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eB\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e) and \u003cstrong\u003eQ\u003c/strong\u003e (\u003cstrong\u003e0\u003c/strong\u003e ≤ \u003cstrong\u003eQ\u003c/strong\u003e ≤ \u003cstrong\u003e10^5\u003c/strong\u003e) --- number of pictures, size of steps for bots that do not change throughout their lives, and the total number of iterations, respectively. Then in each of \u003cstrong\u003eQ\u003c/strong\u003e of lines written a command for a bot:\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003es I K\u003c/strong\u003e --- first bot \"Likes\" \u003cstrong\u003eK\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eK\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e,\u003cstrong\u003e I+(K-1)A \u003c/strong\u003e≤\u003cstrong\u003e N-1\u003c/strong\u003e) pictures, starting from \u003cstrong\u003eI\u003c/strong\u003e-th (\u003cstrong\u003e0\u003c/strong\u003e ≤ \u003cstrong\u003eI\u003c/strong\u003e ≤ \u003cstrong\u003eN-1\u003c/strong\u003e). \u003cstrong\u003eg J L\u003c/strong\u003e --- second bot counts rating of \u003cstrong\u003eL\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eL\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e, \u003cstrong\u003eJ+(L-1)B \u003c/strong\u003e≤\u003cstrong\u003e N-1\u003c/strong\u003e) pictures, starting from \u003cstrong\u003eJ\u003c/strong\u003e-th (\u003cstrong\u003e0\u003c/strong\u003e ≤ \u003cstrong\u003eJ\u003c/strong\u003e ≤ \u003cstrong\u003eN-1\u003c/strong\u003e).\u003c/p\u003e\n\n\u003cp\u003eBefore bots started their actions, all pictures had rating \u003cstrong\u003e0\u003c/strong\u003e.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eIn a separate line print a result for each command for second bot.\u003c/p\u003e\n\n"}}]}