{"raw_statement":[{"iden":"problem statement","content":"Mr. AtCoder reads in the newspaper that today's lucky number is a positive integer $A$ and tomorrow's is a positive integer $B$.\nHere, he defines a positive integer $x$ that satisfies both of the following conditions as a super-lucky number.\n\n*   The decimal notation of $x$ contains $A$ as a contiguous substring.\n*   The decimal notation of $2x$ contains $B$ as a contiguous substring.\n\nActually, under the Constraints of this problem, there is always a super-lucky number less than $10^{18}$. Find one such number."},{"iden":"constraints","content":"*   $1 \\leq A < 10^8$\n*   $1 \\leq B < 10^8$\n*   $A$ and $B$ have no leading `0`s.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$\n$B$"},{"iden":"sample input 1","content":"13\n62"},{"iden":"sample output 1","content":"131\n\nOne super-lucky number is $x = 131$, because:\n\n*   $x = 131$ contains $13$ as a substring. ($1$\\-st through $2$\\-nd characters)\n*   $2x = 262$ contains $62$ as a substring. ($2$\\-nd through $3$\\-rd characters)\n\nSome other super-lucky numbers are $313$, $8135$, and $135797531$, which would also be accepted."},{"iden":"sample input 2","content":"69120\n824"},{"iden":"sample output 2","content":"869120\n\nOne super-lucky number is $x = 869120$, because:\n\n*   $x = 869120$ contains $69120$ as a substring. ($2$\\-nd through $6$\\-th characters)\n*   $2x = 1738240$ contains $824$ as a substring. ($4$\\-th through $6$\\-th characters)\n\nThe smallest super-lucky number is $69120$, but note that any lucky number with at most $18$ digits would be accepted."},{"iden":"sample input 3","content":"6283185\n12566370"},{"iden":"sample output 3","content":"6283185\n\nWhen $x = 6283185$, $x$ is $A$ itself, and $2x$ is $B$ itself. In such a case too, $x$ is a super-lucky number."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}