from Crypto.Util.number import long_to_bytes import gmpy2
N = 12194420073815392880989031611545296854145241675320130314821394843436947373331080911787176737202940676809674543138807024739454432089096794532016797246441325729856528664071322968428804098069997196490382286126389331179054971927655320978298979794245379000336635795490242027519669217784433367021578247340154647762800402140321022659272383087544476178802025951768015423972182045405466448431557625201012332239774962902750073900383993300146193300485117217319794356652729502100167668439007925004769118070105324664379141623816256895933959211381114172778535296409639317535751005960540737044457986793503218555306862743329296169569 e = 65537 c = 4504811333111877209539001665516391567038109992884271089537302226304395434343112574404626060854962818378560852067621253927330725244984869198505556722509058098660083054715146670767687120587049288861063202617507262871279819211231233198070574538845161629806932541832207041112786336441975087351873537350203469642198999219863581040927505152110051313011073115724502567261524181865883874517555848163026240201856207626237859665607255740790404039098444452158216907752375078054615802613066229766343714317550472079224694798552886759103668349270682843916307652213810947814618810706997339302734827571635179684652559512873381672063
# Step 1: Factorize N (since p ≈ q, we can use Fermat's factorization) deffermat_factorization(N): a = gmpy2.isqrt(N) + 1 b2 = a * a - N whilenot gmpy2.is_square(b2): a += 1 b2 = a * a - N b = gmpy2.isqrt(b2) p = a + b q = a - b returnint(p), int(q)
Dear Friend ; Especially for you - this amazing announcement . This is a one time mailing there is no need to request removal if you won't want any more ! This mail is being sent in compliance with Senate bill 2316 , Title 1 ; Section 303 ! This is not a get rich scheme . Why work for somebody else when you can become rich in 77 months . Have you ever noticed society seems to be moving faster and faster and more people than ever are surfing the web ! Well, now is your chance to capitalize on this ! We will help you turn your business into an E-BUSINESS and sell more . You can begin at absolutely no cost to you . But don't believe us . Ms Ames who resides in Indiana tried us and says "Now I'm rich, Rich, RICH" . We are licensed to operate in all states . If not for you then for your LOVED ONES - act now ! Sign up a friend and you'll get a discount of 30% ! Thank-you for your serious consideration of our offer . Dear Internet user ; Your email address has been submitted to us indicating your interest in our letter ! This is a one time mailing there is no need to request removal if you won't want any more ! This mail is being sent in compliance with Senate bill 1620 , Title 8 ; Section 302 . THIS IS NOT MULTI-LEVEL MARKETING . Why work for somebody else when you can become rich inside 25 days . Have you ever noticed more people than ever are surfing the web and people will do almost anything to avoid mailing their bills ! Well, now is your chance to capitalize on this ! We will help you sell more plus process your orders within seconds . You can begin at absolutely no cost to you . But don't believe us . Prof Anderson of Hawaii tried us and says "Now I'm rich many more things are possible" ! We are a BBB member in good standing . Do not go to sleep without ordering ! Sign up a friend and your friend will be rich too . Thank-you for your serious consideration of our offer ! Dear Friend , You made the right decision when you signed up for our club ! If you no longer wish to receive our publications simply reply with a Subject: of "REMOVE" and you will immediately be removed from our mailing list ! This mail is being sent in compliance with Senate bill 2616 ; Title 5 ; Section 304 . THIS IS NOT MULTI-LEVEL MARKETING ! Why work for somebody else when you can become rich inside 53 weeks . Have you ever noticed people love convenience & nearly every commercial on television has a .com on in it ! Well, now is your chance to capitalize on this . We will help you increase customer response by 160% and deliver goods right to the customer's doorstep ! You can begin at absolutely no cost to you ! But don't believe us . Mr Jones of California tried us and says "My only problem now is where to park all my cars" ! We are licensed to operate in all states . We implore you - act now ! Sign up a friend and you get half off . Thanks .