{"problem":{"name":"Plus Matrix","description":{"content":"Given is an $N \\times N$ matrix $C$ whose elements are non-negative integers. Determine whether there is a pair of sequences of non-negative integers $A_1,A_2,\\ldots,A_N$ and $B_1,B_2,\\ldots,B_N$ such","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc115_b"},"statements":[{"statement_type":"Markdown","content":"Given is an $N \\times N$ matrix $C$ whose elements are non-negative integers. Determine whether there is a pair of sequences of non-negative integers $A_1,A_2,\\ldots,A_N$ and $B_1,B_2,\\ldots,B_N$ such that $C_{i,j}=A_i+B_j$ for every $(i, j)$. If the answer is yes, print one such pair.\n\n## Constraints\n\n*   $1 \\leq N \\leq 500$\n*   $0 \\leq C_{i,j} \\leq 10^9$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$C_{1,1}$ $C_{1,2}$ $\\ldots$ $C_{1,N}$\n$C_{2,1}$ $C_{2,2}$ $\\ldots$ $C_{2,N}$\n$:$\n$C_{N,1}$ $C_{N,2}$ $\\ldots$ $C_{N,N}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc115_b","tags":[],"sample_group":[["3\n4 3 5\n2 1 3\n3 2 4","Yes\n2 0 1\n2 1 3\n\nNote that $A$ and $B$ consist of non-negative integers."],["3\n4 3 5\n2 2 3\n3 2 4","No"]],"created_at":"2026-03-03 11:01:14"}}