function [a, b]=get_gen_mat(n)
a=floor(5*(2*rand(n)-1));
for i=1:n
    s=0;
    for j=1:n
        if j~=i
            s=s+abs(a(i,j));
        end
    end
    sg=sign(2*rand(1)-1);
    a(i,i) = sg*(s+floor(10*(rand(1)))+1);
end
b=floor(5*(2*rand(n,1)-1));