How to break input according to test cases in C#

i want to know how to break input file according to need, like if we have several test cases, how can we break it into different test cases??
for ex:

4 4

3 5

2 2

1 2 3

1 3 3

2 4 1

3 4 3

4 4

3 2

2 2

1 2 3

1 3 3

2 4 1

3 4 3

0 0

here we have two test cases, how can i break it and then process it further??

format it properly

Hi,if you mean that you wanna categorize your test cases to three number & two number the solution is :

        string Input = Console.ReadLine();
        string[] EachInput = Input.Split(' ');
        if (EachInput.Count() == 3)
        {

        }
        else if (EachInput.Count() == 2)
        {

        }

I think your answer is that

Good Luck