<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(template):
 """ Try to guess the input format """


    try:
        data = load_json(template)
        return data, "json"
    except ValueError as e:
        try:
            data = load_yaml(template)
            return data, "yaml"
        except Exception:
            raise e