void AddSplit(HashSet <Triple> result, long x, long y, long limit) { if (y > limit) { return; } for (int i = 1; i <= x / 2; i++) { if (i <= limit && x - i <= limit) { Triple t = new Triple(i, x - i, y); if (t.MinIsInt()) { result.Add(t); } } } }