#include using namespace std; #define fst(t) std::get<0>(t) #define snd(t) std::get<1>(t) #define thd(t) std::get<2>(t) using ll = long long; using P = std::tuple; const int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, -1, 1}; int N; ll A[100100], B[100100]; bool isValid(){ for(int i=0;i> N; for(int i=0;i> A[i]; } if(N == 1){ if(A[0] > 1){ std::cout << 2 << std::endl; std::cout << 1 << std::endl; std::cout << (A[0] - 1) << std::endl; }else{ std::cout << "-1" << std::endl; } return 0; } if(!isValid()){ std::cout << "-1" << std::endl; return 0; } std::cout << (N+1) << std::endl; B[0] = 1; for(int i=0;i