{"raw_statement":[{"iden":"problem statement","content":"You are given integers $N,A_1,A_2,A_3$. Find the number, modulo $998244353$, of triples of positive integers $(X_1,X_2,X_3)$ that satisfy all of the following three conditions.\n\n*   $1\\leq X_i \\leq N$ for every $i$.\n*   $X_i$ is a multiple of $A_i$ for every $i$.\n*   $(X_1 \\oplus X_2) \\oplus X_3 = 0$, where $\\oplus$ denotes bitwise xor.\n\nWhat is bitwise xor? The bitwise xor of non-negative integers $A$ and $B$, $A \\oplus B$, is defined as follows.\n\n*   When $A \\oplus B$ is written in binary, the $2^k$s place ($k \\geq 0$) is $1$ if exactly one of the $2^k$s places of $A$ and $B$ is $1$, and $0$ otherwise.\n\nFor instance, $3 \\oplus 5 = 6$ (in binary: $011 \\oplus 101 = 110$)."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   $1 \\leq A_i \\leq 10$\n*   All input values are integers."},{"iden":"input","content":"The Input is given from Standard Input in the following format:\n\n$N$ $A_1$ $A_2$ $A_3$"},{"iden":"sample input 1","content":"13 2 3 5"},{"iden":"sample output 1","content":"4\n\nFour triples $(X_1,X_2,X_3)$ satisfy the conditions: $(6,3,5),(6,12,10),(12,6,10),(12,9,5)$."},{"iden":"sample input 2","content":"1000000000000000000 1 1 1"},{"iden":"sample output 2","content":"426724011"},{"iden":"sample input 3","content":"31415926535897932 3 8 4"},{"iden":"sample output 3","content":"759934997"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}