using System.Collections.Generic;
public static void Main()
int[] a = new int[]{12, 10, 5, 2, 7, 7, 49};
HashSet<int> possibleSums = new HashSet<int>(a);
for (int i = 0; i < a.Length - 1; i++)
for (int j = i + 1; j < a.Length; j++)
int pairSum = a[i] + a[j];
if (possibleSums.Contains(pairSum))
Console.WriteLine("({0},{1})", a[i], a[j]);