parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Focm":[function(require,module,exports) {
var n={};!function(t){"use strict";n["Data.Functor"],n["Control.Semigroupoid"],n["Data.Function"],n["Data.Unit"];t.Functor=function(n){this.map=n},t.map=function(n){return n.map}}(n["Data.Functor"]=n["Data.Functor"]||{}),function(t){"use strict";n["Control.Apply"],n["Control.Category"],n["Data.Function"],n["Data.Functor"];t.Apply=function(n,t){this.Functor0=n,this.apply=t},t.apply=function(n){return n.apply}}(n["Control.Apply"]=n["Control.Apply"]||{}),function(t){"use strict";n["Control.Apply"],n["Data.Functor"],n["Data.Unit"];t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=function(n){return n.pure}}(n["Control.Applicative"]=n["Control.Applicative"]||{}),function(t){"use strict";n["Control.Bind"],n["Control.Applicative"],n["Control.Apply"],n["Control.Category"],n["Data.Function"],n["Data.Functor"],n["Data.Unit"];t.Bind=function(n,t){this.Apply0=n,this.bind=t},t.bind=function(n){return n.bind}}(n["Control.Bind"]=n["Control.Bind"]||{}),function(t){"use strict";(n["Data.Boolean"]=n["Data.Boolean"]||{}).otherwise=!0}(),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(t){"use strict";var a=n["Data.Show"],e=(n["Data.Symbol"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.show=n}),r=new e(a.showIntImpl);t.Show=e,t.show=function(n){return n.show},t.showInt=r}(n["Data.Show"]=n["Data.Show"]||{}),function(t){"use strict";n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"],n["Control.Apply"],n["Control.Bind"],n["Control.Category"],n["Control.Extend"],n["Control.Monad"],n["Control.MonadZero"],n["Control.Plus"],n["Data.Bounded"],n["Data.Eq"],n["Data.Function"],n["Data.Functor"],n["Data.Functor.Invariant"],n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Unit"],n.Prelude;var a=function(){function n(){}return n.value=new n,n}(),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=a,t.Just=e,t.maybe=function(n){return function(t){return function(r){if(r instanceof a)return n;if(r instanceof e)return t(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}}}(n["Data.Maybe"]=n["Data.Maybe"]||{}),function(t){"use strict";n["Control.Alt"];var a=n["Control.Applicative"],e=n["Control.Apply"],r=n["Control.Bind"],i=(n["Control.Extend"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifoldable"],n["Data.Bifunctor"],n["Data.Bitraversable"],n["Data.Bounded"],n["Data.Eq"],n["Data.Foldable"],n["Data.FoldableWithIndex"],n["Data.Function"],n["Data.Functor"]),o=(n["Data.Functor.Invariant"],n["Data.FunctorWithIndex"],n["Data.Maybe"]),u=(n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Traversable"],n["Data.TraversableWithIndex"],n["Data.Unit"],n.Prelude,function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}()),c=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),f=new i.Functor(function(n){return function(t){if(t instanceof u)return new u(t.value0);if(t instanceof c)return new c(n(t.value0));throw new Error("Failed pattern match at Data.Either (line 38, column 8 - line 38, column 52): "+[t.constructor.name])}}),l=function(n){return function(t){return function(a){if(a instanceof u)return n(a.value0);if(a instanceof c)return t(a.value0);throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): "+[n.constructor.name,t.constructor.name,a.constructor.name])}}},s=new e.Apply(function(){return f},function(n){return function(t){if(n instanceof u)return new u(n.value0);if(n instanceof c)return i.map(f)(n.value0)(t);throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 82, column 41): "+[n.constructor.name,t.constructor.name])}}),D=new r.Bind(function(){return s},l(function(n){return function(t){return new u(n)}})(function(n){return function(t){return t(n)}})),d=new a.Applicative(function(){return s},c.create);t.Left=u,t.Right=c,t.either=l,t.note=function(n){return o.maybe(new u(n))(c.create)},t.functorEither=f,t.applyEither=s,t.applicativeEither=d,t.bindEither=D}(n["Data.Either"]=n["Data.Either"]||{}),function(n){"use strict";n.intDegree=function(n){return Math.min(Math.abs(n),2147483647)},n.intDiv=function(n){return function(t){return 0===t?0:t>0?Math.floor(n/t):-Math.floor(n/-t)}},n.intMod=function(n){return function(t){if(0===t)return 0;var a=Math.abs(t);return(n%a+a)%a}}}(n["Data.EuclideanRing"]=n["Data.EuclideanRing"]||{}),function(t){"use strict";(n["Data.Ring"]=n["Data.Ring"]||{}).intSub=function(n){return function(t){return n-t|0}}}(),function(n){"use strict";n.intAdd=function(n){return function(t){return n+t|0}},n.intMul=function(n){return function(t){return n*t|0}}}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(t){"use strict";var a=n["Data.Semiring"],e=(n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.Row"],n["Type.Data.RowList"],function(n,t,a,e){this.add=n,this.mul=t,this.one=a,this.zero=e}),r=new e(a.intAdd,a.intMul,1,0);t.Semiring=e,t.add=function(n){return n.add},t.zero=function(n){return n.zero},t.mul=function(n){return n.mul},t.one=function(n){return n.one},t.semiringInt=r}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(t){"use strict";var a=n["Data.Ring"],e=n["Data.Semiring"],r=(n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n,t){this.Semiring0=n,this.sub=t}),i=new r(function(){return e.semiringInt},a.intSub);t.Ring=r,t.sub=function(n){return n.sub},t.ringInt=i}(n["Data.Ring"]=n["Data.Ring"]||{}),function(t){"use strict";var a=n["Data.Ring"],e=(n["Data.Semiring"],n["Data.Symbol"],n["Data.Unit"],function(n){this.Ring0=n}),r=new e(function(){return a.ringInt});t.CommutativeRing=e,t.commutativeRingInt=r}(n["Data.CommutativeRing"]=n["Data.CommutativeRing"]||{}),function(t){"use strict";var a=n["Data.EuclideanRing"],e=(n["Data.BooleanAlgebra"],n["Data.CommutativeRing"]),r=(n["Data.Eq"],n["Data.HeytingAlgebra"],n["Data.Ring"],n["Data.Semiring"],function(n,t,a,e){this.CommutativeRing0=n,this.degree=t,this.div=a,this.mod=e}),i=new r(function(){return e.commutativeRingInt},a.intDegree,a.intDiv,a.intMod);t.EuclideanRing=r,t.degree=function(n){return n.degree},t.div=function(n){return n.div},t.mod=function(n){return n.mod},t.euclideanRingInt=i}(n["Data.EuclideanRing"]=n["Data.EuclideanRing"]||{}),function(t){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(t){return function(a){var e;e=a<11?"[0-"+(a-1).toString()+"]":11===a?"[0-9a]":"[0-9a-"+String.fromCharCode(86+a)+"]";var r=new RegExp("^[\\+\\-]?"+e+"+$","i");return function(e){if(r.test(e)){var i=parseInt(e,a);return(0|i)===i?n(i):t}return t}}}}}(),function(t){"use strict";var a=n["Data.Int"],e=(n["Control.Category"],n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Bounded"],n["Data.CommutativeRing"],n["Data.DivisionRing"],n["Data.Eq"],n["Data.EuclideanRing"],n["Data.HeytingAlgebra"],n["Data.Int.Bits"],n["Data.Maybe"]),r=(n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n["Data.Semiring"],n["Data.Show"],n.Global,n.Math,n.Prelude,a.fromStringAsImpl(e.Just.create)(e.Nothing.value)),i=r(10);t.fromString=i,t.fromStringAs=r}(n["Data.Int"]=n["Data.Int"]||{}),function(n){"use strict";n.split=function(n){return function(t){return t.split(n)}},n.trim=function(n){return n.trim()}}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(t){"use strict";var a=n["Data.String.Common"];n["Data.Eq"],n["Data.Ordering"],n["Data.String.Pattern"],n.Prelude;t.split=a.split,t.trim=a.trim}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(t){"use strict";(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}).unsafePartial=function(n){return n()}}(),function(t){"use strict";(n["Partial"]=n["Partial"]||{}).crashWith=function(){return function(n){throw new Error(n)}}}(),function(t){"use strict";var a=n.Partial;t.crashWith=a.crashWith}(n.Partial=n.Partial||{}),function(t){"use strict";var a=n["Partial.Unsafe"],e=n.Partial;t.unsafeCrashWith=function(n){return a.unsafePartial(function(t){return e.crashWith(t)(n)})}}(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}),function(t){"use strict";var a=n["Control.Applicative"],e=n["Control.Bind"],r=n["Data.Boolean"],i=n["Data.Either"],o=(n["Data.Eq"],n["Data.EuclideanRing"]),u=n["Data.Int"],c=(n["Data.Ring"],n["Data.Semiring"],n["Data.Show"]),f=(n["Data.String"],n["Data.String.Common"]),l=(n["Data.String.Pattern"],n["Partial.Unsafe"]),s=(n.Prelude,function(n){return e.bind(i.bindEither)(2===(t=f.split(" ")(f.trim(n))).length?e.bind(i.bindEither)(i.note("a")(u.fromString(t[0])))(function(n){return e.bind(i.bindEither)(i.note("b")(u.fromString(t[1])))(function(t){return a.pure(i.applicativeEither)({a:n,b:t})})}):new i.Left("invalid line"))(function(n){return a.pure(i.applicativeEither)(c.show(c.showInt)((t=n.a,function(n){if(0===o.mod(o.euclideanRingInt)(n)(t))return t+n|0;if(r.otherwise)return n-t|0;throw new Error("Failed pattern match at AtCoder.ABC118.A (line 30, column 1 - line 30, column 29): "+[t.constructor.name,n.constructor.name])})(n.b)));var t});var t});t.solve=function(n){var t=s(n);if(t instanceof i.Left)return l.unsafeCrashWith(t.value0);if(t instanceof i.Right)return t.value0;throw new Error("Failed pattern match at AtCoder.ABC118.A (line 15, column 3 - line 17, column 17): "+[t.constructor.name])}}(n["AtCoder.ABC118.A"]=n["AtCoder.ABC118.A"]||{}),function(t){"use strict";(n["Effect.Console"]=n["Effect.Console"]||{}).log=function(n){return function(){return console.log(n),{}}}}(),function(t){"use strict";var a=n["Effect.Console"];n["Data.Show"],n["Data.Unit"],n.Effect;t.log=a.log}(n["Effect.Console"]=n["Effect.Console"]||{}),function(t){"use strict";n["Node.Encoding"];var a=n["Data.Show"],e=(n.Prelude,function(){function n(){}return n.value=new n,n}()),r=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),s=new a.Show(function(n){if(n instanceof e)return"ASCII";if(n instanceof r)return"UTF8";if(n instanceof i)return"UTF16LE";if(n instanceof o)return"UCS2";if(n instanceof u)return"Base64";if(n instanceof c)return"Latin1";if(n instanceof f)return"Binary";if(n instanceof l)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=e,t.UTF8=r,t.UTF16LE=i,t.UCS2=o,t.Base64=u,t.Latin1=c,t.Binary=f,t.Hex=l,t.showEncoding=s}(n["Node.Encoding"]=n["Node.Encoding"]||{}),function(t){"use strict";(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}).unsafeRequireFS=require("fs")}(),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(t){"use strict";var a=n["Unsafe.Coerce"];t.unsafeCoerce=a.unsafeCoerce}(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}),function(t){"use strict";var a=n["Node.FS.Internal"],e=(n.Effect,n.Prelude,n["Unsafe.Coerce"].unsafeCoerce);t.mkEffect=e,t.unsafeRequireFS=a.unsafeRequireFS}(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}),function(t){"use strict";n["Control.Bind"],n["Control.Semigroupoid"],n["Data.DateTime"],n["Data.DateTime.Instant"],n["Data.EuclideanRing"],n["Data.Function"],n["Data.Function.Uncurried"],n["Data.Functor"],n["Data.Int"],n["Data.Maybe"],n["Data.Nullable"];var a=n["Data.Show"],e=(n["Data.Time.Duration"],n.Effect,n["Node.Buffer"],n["Node.Encoding"]),r=(n["Node.FS"],n["Node.FS.Internal"]),i=(n["Node.FS.Perms"],n["Node.FS.Stats"],n["Node.Path"],n.Prelude,r.unsafeRequireFS);t.readTextFile=function(n){return function(t){return r.mkEffect(function(r){return i.readFileSync(t,{encoding:a.show(e.showEncoding)(n)})})}}}(n["Node.FS.Sync"]=n["Node.FS.Sync"]||{}),function(t){"use strict";var a=n["AtCoder.ABC118.A"],e=(n["Control.Applicative"],n["Control.Bind"],n.Effect,n["Effect.Console"]),r=n["Node.Encoding"],i=n["Node.FS.Sync"];n.Prelude;t.main=function(){var n=i.readTextFile(r.UTF8.value)("/dev/stdin")(),t=a.solve(n);return e.log(t)()}}(n.Main=n.Main||{}),n.Main.main();
},{}]},{},["Focm"], null)

Measured memory_bytes: 7500