n, m = map(int, input().split()) N = 1<