If a line makes angles 90∘,135∘,45∘ with the positive X,Y and Z-axes respectively, find its direction cosines.