{"problem":{"name":"106","description":{"content":"Given is an integer $N$. Determine whether there is a pair of positive integers $(A, B)$ such that $3^A + 5^B = N$, and find one such pair if it exists.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc106_a"},"statements":[{"statement_type":"Markdown","content":"Given is an integer $N$. Determine whether there is a pair of positive integers $(A, B)$ such that $3^A + 5^B = N$, and find one such pair if it exists.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^{18}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc106_a","tags":[],"sample_group":[["106","4 2\n\nWe have $3^4 + 5^2 = 81 + 25 = 106$, so $(A, B) = (4, 2)$ satisfies the condition."],["1024","\\-1"],["10460353208","21 1"]],"created_at":"2026-03-03 11:01:13"}}