{"code":"matmul_10","name":"Bài khó","description":"Cho $f_x = c^{2x - 6} \\times f_{x - 1} \\times f_{x - 2} \\times f_{x - 3}$ với $x \\ge 4$. Hãy tính $f_n$ lấy dư cho $10^9 + 7$.\r\n\r\n#### Input\r\n - Gồm một dòng là các số $n, f_1, f_2, f_3, c$ $(4 \\le n \\le 10^{18}, 1 \\le f_1, f_2, f_3 \\le 10^9)$.\r\n\r\n#### Output\r\n - Một số nguyên duy nhất là đáp án của bài toán.\r\n\r\n#### Example\r\n!!! question \"Test 1\"\r\n    ???+ \"Input\"\r\n        ```sample\r\n        5 1 2 5 3\r\n        ```\r\n    ??? success \"Output\"\r\n        ```sample\r\n        72900\r\n        ```\r\n        \r\n!!! question \"Test 2\"\r\n    ???+ \"Input\"\r\n        ```sample\r\n        17 97 41 37 11\r\n        ```\r\n    ??? success \"Output\"\r\n        ```sample\r\n        317451037\r\n        ```","points":400.0,"partial":true,"time_limit":1.0,"memory_limit":524288,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}