import java.util.Scanner;

public class Test03 {
	public static void main(String[] args) {
		Scanner scanf = new Scanner(System.in);
		int i, sw, j, k;
		i = 50000;
		sw = 0;
		j = scanf.nextInt();
		while (true)
		{
			k = j / i;
			System.out.printf("%d, %d\n", i, k);
			if (i <= 1)
				break;
			j -= k * i;
			if (sw == 0)
			{
				i /= 5;
				sw = 1;
			}
			else
			{
				i /= 2;
				sw = 0;
			}
		}
		scanf.close();
	}
}
