An Inverse Problem originating from Magnetohydrodynamics III. Domains with corners of arbitrary angles