Systems of linear equations and inequalities