#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int M; cin >> M; int m2 = 1< S(m2); for(auto &s : S) cin >> s,s = s*s; vector> P(m2,vector(m2)); for(int i=0; i W(m2,1); for(int d=0; d next(m2); for(int i=0; i