def next_coordinates(curr_coords):
    """Get coordinates of next square in spiral."""
    x, y = curr_coords
    layer = max(abs(x), abs(y))
    if y == -layer:
        return x + 1, y
    if x == -layer:
        return x, y - 1
    if y == layer:
        return x - 1, y
    if x == layer:
        return x, y + 1
    else:
        raise ValueError('Incorrect coords {}'.format(curr_coords))