line-mode
read-nums
length
half
f:
    @3
    2
    chunks
    2
    range
    itemize
    swap
    m:
        extract-array
        even
        swap
        save-b
        bnot
        4
        %
        save-c
        logical-or
        times #(list)
        @8
        push-c
        not
        shift-right
        push-b
        push-c
        odd
        -
        push-c
        half
        f:
            {
                1
                push-b
                4
                /
                binary #(num to list)
                    tuck-c
                    pow
                    *
                    square
                    push-b
                    %
                b6
                each
                dec
                push-c
                inc
                pop-c
            }
                %
                @1
                tuck
                square
                push-b
                <
            b6
                    push-a
                    unless
                b2
                catenate #(block+block)
                save-a
                eval
                @7
            t6
            pop
            pop-c
        }
        pop-d
                dup
                reverse
                    dup
                    reverse
                    pair
                    m:
                        push-c
                        negate
                        save-c
                        push-d
                        pair
                            *
                        z1
                        sum
                        abs
                    }
                    sort #(list)
                t6
            m4
            sort #(list)
            group
                head
            m1
        b6
        times #(eval)
    }
    pop
            show
            ( "^2" )
            catenate #(list+list)
            "+"
        m4
        init
        extract-array
        "="
    m5
    init
    unwords