Cómo tomar dos espacios separados int en python

N, M = map(int, input().split())
    print(N, M)
Excited Earthworm