Myanmar grants amnesty to thousands of prisoners