/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int [][]b = new int[10000][10000];
		for(int i=0;i<m; i++){
			int x=0,y=0;
			x=sc.nextInt();
			y=sc.nextInt();
			b[x][y] = 1;
			b[y][x] = 1;
		}
		
		for (int i = 0; i < n; i++) {
            int c = 0;
            for (int j = 0; j < n; j++) {
                if (b[i][j] == 1) {
                    c++;
                }
            }
            System.out.println(i + " " + c);
        }
	}
}