{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given three \u003ci\u003en\u003c/i\u003e × \u003ci\u003en\u003c/i\u003e matrices \u003ci\u003eA\u003c/i\u003e, \u003ci\u003eB\u003c/i\u003e and \u003ci\u003eC\u003c/i\u003e. Does the equation \u003ci\u003eA\u003c/i\u003e × \u003ci\u003eB\u003c/i\u003e \u003d \u003ci\u003eC\u003c/i\u003e hold true?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of input contains a positive integer \u003ci\u003en\u003c/i\u003e (\u003ci\u003en\u003c/i\u003e ≤ 500) followed by the the three matrices \u003ci\u003eA\u003c/i\u003e, \u003ci\u003eB\u003c/i\u003e and \u003ci\u003eC \u003c/i\u003erespectively. Each matrix\u0027s description is a block of n × n integers.\u003c/p\u003e\u003cp\u003eIt guarantees that the elements of \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e are less than 100 in absolute value and elements of \u003ci\u003eC\u003c/i\u003e are less than 10,000,000 in absolute value.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput \"YES\" if the equation holds true, otherwise \"NO\".\u003c/p\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n1 0\r\n2 3\r\n5 1\r\n0 8\r\n5 1\r\n10 26\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"Multiple inputs will be tested. So O(n\u003csup\u003e3\u003c/sup\u003e) algorithm will get TLE."}}]}