Help me in solving PPSC96 problem

My issue

Nm

My code

#include <stdio.h>

int main() {
    int N, M;
    scanf("%d %d", &N, &M);

    // Update your code below this line


    
    
}

Learning course: Programming and Problem solving using C
Problem Link: https://www.codechef.com/learn/course/ciet-programming-c/CIETPC22/problems/PPSC96