Відправити по sms: The Hasse principle and the Brauer-Manin obstruction for curves