Perimeter - Rectangle

Is it possible to define a rectangle that constructs itself to always equal a fixed (constant) perimeter while allowing the user to input proposed length and width solutions?

Formula for perimeter of rectangle: P = 2(l + w) or P2l + 2w

P = Perimeter
l = length
w = width


What might be the most unadorned, minimalist, way to do so?


Thank you

Enthusiastic dabbler