using System.Collections.Generic;
public static void Main()
Dictionary<int, int> num = new Dictionary<int, int>();
foreach(KeyValuePair<int, int> ele1 in num)
Console.WriteLine("{0} {1}", ele1.Key, ele1.Value);
KeyValuePair<int, int> max =new KeyValuePair<int, int>();
if(kvp.Value > max.Value)
Console.WriteLine("{0} {1}", max.Key,max.Value);
foreach(KeyValuePair <int, int> kv in num.OrderBy(key => key.Value))
foreach(KeyValuePair <int, int> kv in num.OrderBy(key => key.Key))
foreach(KeyValuePair <int, int> kv in num.OrderByDescending(key => key.Value))