where n and m are