Merkel warns EU and UK against rigid approach to Brexit talks