public List <Eq> split() { List <Eq> res = new List <Eq>(); res.Add(this); if (this.operat == "") { ; } else { if (operand1 != null) { if (operand1.split().Exists(x => (x.print().Equals("x") || x.print().Equals("y")))) { foreach (Eq x in operand1.split()) { res.Add(x); } } } if (operand2 != null) { if (operand2.split().Exists(x => (x.print().Equals("x") || x.print().Equals("y")))) { foreach (Eq x in operand2.split()) { res.Add(x); } } } } return(res); }