This trial is conducted in Europe and Asia. The aim of this clinical trial is to investigate the safety, pharmacokinetics (how the trial drug is distributed in the body) and pharmacodynamics (physiological effects of the drug on the body) of NNC 0172-0000-2021 administered intravenously and subcutaneously to healthy male subjects and subjects with haemophilia A or B