When can the law of sines be used?