function F = solve_l_k(x,beta_P,beta_I,pic_ss,tau_p,mu_p,alpha,omega_I,omega_P, ... 
            gy_ss,mu_L,tau_L,m_chi_ss,delta_chi,A_chi,sigma_chi,mu_n,A_n,sigma_n, ...
            mu_w,tau_w,theta_w,theta_p,theta_L,sigma_c,zeta,tax_I,zeta_chi,p_chi,R,k,mc)

global start
        
r_k=x(1);
l=x(2);

w           = (1-alpha)*mc^(1/(1-alpha))*(r_k/alpha)^(-alpha/(1-alpha));
l_b         = omega_I*l;
k_tilde     = k;
i_k         = 0;
n           = (1-alpha)/alpha*r_k/w*k;
y           = k^alpha*n^(1-alpha);
t           = tax_I;
R_Lb        = R;
R_L_tilde   = mu_L/tau_L*R_Lb;
R_L         = R_L_tilde;
chi_I       = R_L*l/pic_ss/m_chi_ss/p_chi/(1-delta_chi);
u_c_I       = A_chi*(chi_I*(1-zeta_chi))^(-sigma_chi)/(1-beta_I*(1-delta_chi)-(1/R_L-beta_I/pic_ss)*m_chi_ss*pic_ss*(1-delta_chi))/p_chi;
lambda_2    = u_c_I*(1/R_L-beta_I/pic_ss);
w_I_tilde   = (mu_w*A_n*n^sigma_n*w^(sigma_n*mu_n/(mu_n-1))/u_c_I/tau_w)^((1-mu_n)/(1-mu_n-sigma_n*mu_n));
w_I         = w_I_tilde;
n_I         = (w_I/w)^(mu_n/(1-mu_n))*n;
w_P         = omega_P^(mu_n-1)*(w^(1/(1-mu_n))-omega_I*w_I^(1/(1-mu_n)))^(1-mu_n);
w_P_tilde   = w_P;
n_P         = (w_P/w)^(mu_n/(1-mu_n))*n;
u_c_P       = mu_w*A_n*n_P^sigma_n/w_P_tilde/tau_w;
c_P         = u_c_P^(-1/sigma_c)*(1-zeta)^(-1);
c_I         = u_c_I^(-1/sigma_c)*(1-zeta)^(-1);
chi_P       = A_chi^(1/sigma_chi)*(u_c_P*(1-beta_P*(1-delta_chi)))^(-1/sigma_chi)/(1-zeta_chi);
chi         = omega_P*chi_P+omega_I*chi_I;
i_chi       = delta_chi*chi;


F = [c_I+delta_chi*p_chi*chi_I+R_L*l/pic_ss-w_I*n_I-l+t;
     y-omega_P*c_P-omega_I*c_I-i_k-i_chi-gy_ss*y];