function [ F ]  = myfun11(p)
ni = p(1);
ki = p(2);
nj = p(3);
nkj_ss = p(4);
kj = p(5);
yi = p(6);
yj = p(7);
y = p(8);
k = p(9);
n = p(10);
i = p(11);
c =p(12);
w = p(13);
li = p(14);
lj = p(15);
l = p(16);
% LI_LJ = p(17);
% LI_L = p(18);
% YI_YJ = p(19);
% KI_kJ = p(20);
% nki_ss = p(21);


%  ni ki nj nkj_ss kj yi yj y k n i c   w li lj l   LI_LJ LI_L YI_YJ KI_KJ nki_ss 

% the system of 2 equations to solve for in vector F

alpha1 = 0.39;
alpha2 = 0.51;
delta = 0.0536;
beta = 0.9454;
theta1 = 2;
eta1 = 0.0519;
phi1=0.179;
s = 0.15;
b = 1;
varphi1 = 0.05;
varphi2 = 0.95;
rhoa = 0.9;
rhof = 0.9;
rhorh = 0.9;
rhom = 0.9;
gammaf = 0.7;
gammarh = 0.7;
gammam = 0.7;
a = 0;
rh_ss = 1.03;
m_ss = 0.5;
rk = 1/beta-1+delta;
rd = 1/beta;
THETA = (rd-s)/(1-s);
MU = THETA - rh_ss;
ri = (THETA - MU*m_ss)/1.2;
f_ss = 0.2*ri;
rj = THETA;
LI_YI = 1/ri;
LJ_YJ = 1/rj;
LI_L = 0.1;
LI_LJ = LI_L/(1-LI_L);
YI_YJ = LI_LJ*(ri/rj);
KI_KJ = YI_YJ*(rj/ri)*(alpha1/alpha2);
nki_ss = (rk*ri/alpha1)^(1/(1-alpha1));
NI_NJ = (1-alpha1)/(1-alpha2)*YI_YJ*rj/ri;


F= [
%     LI_LJ - LI_L/(1-LI_L);
% YI_YJ - LI_LJ*(ri/rj);
% KI_KJ - YI_YJ*(rj/ri)*(alpha1/alpha2);
% nki_ss - (rk*ri/alpha1)^(1/(1-alpha1));
% NI_NJ - (1-alpha1)/(1-alpha2)*YI_YJ*rj/ri;
ki - ni/(nki_ss);
nj - ni/NI_NJ;
nkj_ss - (rk*rj/alpha2)^(1/(1-alpha2));
kj - nj/nkj_ss;
yi - (nki_ss)^(-alpha1)*ni;
yj - (nkj_ss)^(-alpha2)*nj;
y - (phi1^(1/eta1)*yi^(1-1/eta1)+(1-phi1)^(1/eta1)*yj^(1-1/eta1))^(eta1/(eta1-1));
k - ki-kj;
n - ni-nj;
i - delta*k;
c - y - i;
w - c*n^theta1;
li - w*ni-rk*ki;
lj - w*nj-rk*kj;   
l - li-lj];

end



