Please refer to the following websites:
The Immigration Department of the Government of the Hong Kong Special Administrative Region: https://www.immd.gov.hk
Macao Public Security Police Force Immigration Service:https://www.fsm.gov.mo/psp/cht/main.html