import math


def fancy(lat, lon):
    """Stringifies a point in a rather fancy way, e.g. "44°35'27.6"N
    100°21'53.1"W", i.e. with arc minutes and seconds."""

    # helper function as both latitude and longitude are stringified
    # basically the same way
    def fancy_coord(coord, pos, neg):
        coord_dir = pos if coord > 0 else neg
        coord_tmp = abs(coord)
        coord_deg = math.floor(coord_tmp)
        coord_tmp = (coord_tmp - math.floor(coord_tmp)) * 60
        coord_min = math.floor(coord_tmp)
        coord_sec = round((coord_tmp - math.floor(coord_tmp)) * 600) / 10
        coord = f"{coord_deg}°{coord_min}'{coord_sec}\"{coord_dir}"
        return coord

    lat = fancy_coord(lat, "N", "S")
    lon = fancy_coord(lon, "E", "W")

    return f"{lat} {lon}"