The following data gives the marks of 20 students in Mathematics (X) and statistics (Y), each out of 10, expressed as (x, y). Construct an ungrouped frequency distribution, considering single numbers as a class:
(2, 7), (3, 8), (4, 9), (2, 8), (5, 6), (5, 7), (4, 9), (3, 8), (4, 8), (2, 9), (3, 8), (4, 8), (5, 6), (4, 7),
(4, 7), (4, 6), (5, 6), (5, 7), (4, 6), (5, 5).