#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
const char ans10000[] = "0\n0\n0\n0\n0\n1\n0\n0\n0\n0\n3\n0\n0\n0\n0\n0\n3\n3\n0\n0\n0\n0\n0\n1\n6\n0\n3\n0\n0\n0\n0\n0\n3\n3\n6\n0\n0\n3\n0\n0\n0\n0\n3\n3\n6\n0\n6\n0\n0\n0\n3\n0\n0\n1\n6\n0\n6\n6\n0\n0\n6\n0\n0\n0\n0\n3\n3\n3\n6\n0\n6\n3\n6\n0\n0\n0\n6\n0\n0\n0\n3\n3\n9\n0\n6\n3\n6\n0\n3\n6\n0\n0\n0\n0\n6\n1\n6\n0\n6\n6\n0\n3\n12\n0\n6\n0\n0\n3\n6\n0\n0\n0\n3\n3\n12\n0\n6\n3\n6\n0\n3\n6\n9\n0\n6\n0\n0\n0\n3\n6\n3\n3\n6\n0\n6\n3\n12\n0\n3\n6\n6\n0\n6\n0\n6\n3\n6\n0\n0\n1\n6\n3\n12\n6\n0\n0\n12\n0\n6\n0\n6\n6\n12\n0\n0\n6\n0\n0\n6\n0\n12\n3\n6\n0\n6\n3\n9\n6\n3\n6\n6\n0\n6\n0\n6\n0\n15\n6\n0\n0\n6\n0\n3\n3\n12\n0\n12\n6\n6\n0\n3\n6\n6\n3\n12\n0\n6\n0\n9\n6\n0\n0\n6\n3\n12\n1\n6\n6\n6\n6\n0\n0\n18\n0\n12\n0\n3\n6\n12\n0\n0\n6\n3\n6\n12\n0\n12\n0\n0\n0\n9\n3\n9\n6\n12\n3\n12\n0\n3\n6\n6\n0\n12\n0\n12\n0\n9\n9\n0\n0\n6\n3\n6\n3\n12\n6\n9\n3\n6\n0\n12\n3\n6\n3\n9\n6\n12\n6\n6\n0\n6\n0\n9\n6\n6\n0\n12\n3\n6\n0\n9\n6\n6\n1\n6\n0\n21\n12\n6\n0\n12\n0\n12\n0\n0\n6\n15\n6\n0\n6\n12\n0\n12\n0\n12\n0\n0\n0\n12\n0\n12\n12\n3\n3\n18\n3\n6\n3\n6\n6\n9\n9\n18\n0\n6\n0\n12\n0\n9\n6\n0\n3\n12\n3\n6\n6\n12\n6\n6\n0\n0\n0\n15\n3\n18\n3\n18\n3\n12\n6\n3\n6\n9\n0\n12\n0\n12\n0\n18\n12\n0\n0\n12\n3\n6\n0\n6\n6\n9\n6\n0\n0\n18\n1\n18\n3\n12\n6\n6\n6\n12\n0\n15\n6\n12\n6\n18\n0\n0\n6\n0\n9\n12\n0\n18\n0\n6\n3\n12\n0\n12\n12\n0\n0\n12\n0\n3\n6\n12\n6\n18\n9\n18\n0\n9\n6\n18\n0\n6\n0\n6\n3\n27\n6\n6\n6\n6\n3\n6\n0\n12\n6\n9\n0\n6\n0\n18\n0\n9\n9\n15\n3\n12\n6\n6\n3\n9\n6\n12\n12\n18\n0\n18\n0\n6\n6\n21\n6\n0\n0\n6\n3\n15\n6\n12\n6\n18\n0\n0\n0\n12\n6\n6\n3\n6\n4\n18\n6\n12\n6\n3\n9\n30\n0\n18\n0\n6\n6\n12\n6\n6\n9\n12\n0\n18\n6\n18\n0\n6\n0\n12\n0\n6\n12\n6\n3\n18\n0\n6\n6\n6\n6\n15\n3\n24\n0\n6\n3\n18\n0\n12\n6\n12\n6\n24\n0\n15\n18\n9\n6\n0\n0\n18\n3\n6\n0\n15\n12\n12\n6\n6\n0\n18\n0\n6\n3\n12\n0\n12\n6\n6\n9\n9\n6\n24\n3\n24\n0\n9\n12\n6\n6\n12\n0\n12\n0\n21\n9\n15\n6\n12\n3\n18\n3\n12\n6\n12\n6\n0\n0\n12\n0\n12\n6\n24\n0\n6\n12\n6\n1\n9\n6\n12\n6\n24\n0\n18\n3\n12\n6\n6\n12\n24\n0\n12\n6\n15\n6\n18\n0\n18\n0\n0\n0\n18\n9\n21\n12\n0\n6\n18\n0\n9\n6\n6\n6\n12\n0\n12\n0\n9\n9\n27\n6\n6\n3\n18\n6\n21\n6\n6\n12\n12\n0\n12\n0\n24\n12\n0\n0\n24\n3\n24\n6\n12\n12\n18\n0\n0\n0\n12\n0\n18\n3\n15\n6\n12\n9\n6\n0\n15\n6\n9\n12\n24\n0\n12\n3\n6\n6\n21\n6\n18\n3\n18\n0\n21\n12\n15\n6\n6\n0\n12\n3\n12\n9\n18\n9\n12\n6\n6\n6\n24\n0\n18\n3\n24\n0\n6\n6\n0\n6\n9\n6\n6\n4\n30\n0\n18\n12\n9\n6\n24\n0\n18\n0\n9\n12\n21\n6\n6\n12\n12\n0\n18\n0\n21\n15\n12\n0\n12\n6\n12\n12\n18\n0\n18\n0\n6\n0\n9\n12\n18\n6\n30\n0\n0\n0\n24\n6\n9\n3\n12\n6\n30\n3\n6\n12\n6\n12\n12\n0\n36\n0\n6\n3\n27\n12\n12\n6\n6\n6\n24\n0\n12\n6\n12\n0\n18\n0\n18\n15\n18\n3\n18\n6\n12\n6\n6\n12\n3\n6\n6\n0\n12\n3\n39\n3\n12\n12\n12\n3\n18\n0\n21\n12\n21\n6\n18\n0\n12\n0\n9\n9\n12\n9\n24\n9\n12\n6\n12\n6\n33\n0\n6\n0\n18\n0\n9\n15\n12\n6\n24\n6\n6\n3\n15\n6\n15\n12\n18\n0\n18\n1\n18\n6\n12\n6\n6\n0\n24\n6\n24\n12\n18\n6\n24\n0\n6\n6\n12\n15\n24\n0\n24\n6\n6\n0\n18\n0\n15\n18\n12\n0\n24\n0\n12\n6\n12\n12\n18\n6\n24\n0\n0\n6\n24\n3\n12\n0\n12\n6\n30\n9\n6\n12\n24\n12\n12\n0\n15\n18\n12\n0\n18\n0\n24\n6\n15\n6\n18\n3\n18\n3\n12\n6\n24\n12\n12\n12\n6\n0\n36\n0\n18\n3\n6\n12\n6\n9\n12\n0\n3\n12\n36\n0\n30\n0\n12\n0\n18\n6\n12\n9\n12\n6\n24\n3\n18\n12\n15\n9\n24\n0\n18\n6\n18\n9\n18\n12\n6\n6\n24\n3\n24\n0\n12\n12\n12\n0\n6\n0\n27\n12\n18\n3\n30\n3\n18\n6\n0\n12\n15\n6\n18\n0\n24\n0\n9\n6\n9\n12\n18\n7\n24\n0\n24\n12\n15\n12\n24\n0\n24\n0\n6\n9\n30\n9\n6\n6\n0\n9\n33\n12\n36\n0\n12\n0\n18\n0\n6\n21\n12\n6\n36\n6\n0\n3\n18\n6\n12\n6\n24\n0\n12\n3\n24\n6\n9\n12\n6\n6\n30\n6\n18\n12\n9\n9\n12\n0\n30\n3\n18\n3\n27\n6\n30\n12\n12\n0\n24\n0\n27\n12\n6\n0\n24\n3\n18\n18\n9\n6\n18\n0\n12\n3\n33\n18\n12\n9\n6\n0\n12\n6\n30\n0\n24\n12\n12\n0\n30\n6\n6\n6\n0\n6\n24\n0\n12\n0\n18\n15\n33\n6\n30\n15\n18\n0\n9\n12\n24\n9\n12\n0\n18\n6\n27\n18\n15\n6\n18\n3\n24\n0\n6\n6\n36\n12\n18\n0\n12\n3\n30\n3\n12\n6\n12\n15\n6\n0\n18\n12\n15\n9\n30\n0\n18\n6\n12\n12\n18\n6\n6\n3\n24\n1\n27\n12\n18\n6\n18\n0\n24\n0\n18\n15\n15\n21\n30\n6\n12\n12\n18\n0\n30\n6\n24\n0\n6\n0\n18\n6\n36\n12\n6\n6\n36\n0\n6\n12\n12\n12\n24\n0\n30\n0\n9\n6\n18\n0\n18\n12\n12\n6\n24\n6\n9\n15\n12\n0\n12\n6\n30\n9\n18\n0\n42\n3\n18\n6\n12\n18\n33\n12\n12\n0\n18\n0\n21\n12\n12\n12\n24\n6\n30\n0\n27\n18\n6\n12\n6\n0\n24\n0\n18\n15\n30\n0\n18\n12\n6\n0\n21\n6\n21\n12\n24\n0\n30\n0\n6\n6\n6\n12\n24\n0\n30\n12\n9\n12\n21\n3\n24\n0\n12\n3\n21\n18\n9\n18\n18\n6\n30\n3\n42\n6\n21\n6\n30\n0\n6\n3\n24\n9\n36\n6\n6\n9\n12\n6\n18\n12\n33\n9\n12\n0\n24\n9\n9\n6\n3\n18\n36\n6\n18\n0\n24\n6\n6\n6\n18\n0\n12\n0\n30\n3\n39\n12\n12\n7\n18\n0\n15\n18\n18\n9\n36\n0\n24\n6\n6\n18\n30\n0\n18\n9\n18\n3\n24\n6\n21\n12\n24\n0\n30\n3\n33\n24\n12\n6\n18\n6\n6\n6\n18\n6\n18\n12\n18\n0\n24\n6\n36\n3\n18\n6\n0\n12\n30\n0\n9\n24\n18\n0\n24\n0\n18\n0\n0\n12\n30\n15\n30\n6\n18\n3\n30\n0\n24\n18\n12\n0\n36\n3\n24\n12\n15\n18\n18\n6\n24\n3\n24\n12\n18\n12\n24\n0\n0\n6\n39\n6\n24\n3\n18\n3\n42\n6\n12\n12\n15\n9\n30\n0\n12\n0\n18\n6\n18\n12\n24\n15\n12\n0\n12\n12\n30\n12\n12\n0\n18\n0\n15\n15\n18\n18\n30\n3\n24\n12\n9\n6\n48\n0\n18\n0\n30\n0\n21\n6\n12\n12\n24\n12\n18\n3\n48\n24\n6\n6\n18\n0\n36\n0\n12\n15\n27\n6\n12\n12\n18\n6\n27\n6\n12\n9\n18\n0\n24\n6\n18\n18\n21\n0\n36\n0\n12\n0\n18\n12\n21\n18\n24\n0\n12\n1\n18\n9\n21\n18\n6\n9\n42\n3\n36\n12\n12\n12\n30\n0\n12\n6\n21\n12\n36\n6\n24\n9\n12\n6\n12\n12\n24\n12\n18\n0\n42\n0\n15\n6\n15\n15\n42\n6\n30\n6\n12\n12\n18\n12\n18\n0\n6\n6\n36\n0\n30\n18\n6\n0\n6\n0\n30\n18\n18\n0\n42\n0\n18\n6\n15\n18\n24\n0\n12\n6\n36\n9\n33\n12\n12\n12\n18\n0\n36\n0\n21\n21\n15\n18\n18\n15\n18\n0\n18\n6\n42\n6\n24\n0\n18\n3\n42\n6\n18\n12\n12\n12\n18\n0\n15\n12\n18\n12\n36\n0\n30\n12\n3\n21\n18\n0\n30\n6\n24\n0\n27\n12\n18\n12\n6\n0\n12\n0\n36\n15\n15\n3\n36\n12\n18\n6\n30\n6\n33\n12\n12\n0\n12\n6\n24\n6\n54\n18\n12\n3\n36\n9\n9\n12\n12\n18\n36\n0\n6\n0\n21\n15\n27\n9\n24\n12\n30\n6\n24\n6\n27\n18\n12\n0\n30\n0\n21\n12\n18\n6\n30\n0\n18\n0\n21\n18\n21\n6\n30\n0\n24\n3\n6\n6\n15\n27\n12\n10\n42\n6\n36\n12\n12\n6\n24\n0\n24\n6\n12\n12\n48\n6\n18\n12\n0\n3\n51\n6\n30\n6\n24\n0\n24\n0\n30\n21\n15\n12\n24\n9\n18\n6\n18\n12\n30\n9\n24\n0\n18\n0\n27\n18\n9\n6\n18\n9\n54\n0\n18\n24\n21\n18\n12\n0\n24\n0\n12\n0\n30\n9\n30\n12\n6\n9\n24\n6\n15\n15\n18\n0\n30\n3\n33\n18\n21\n12\n42\n3\n30\n6\n6\n24\n27\n6\n12\n0\n24\n3\n42\n6\n42\n9\n12\n6\n18\n6\n24\n12\n12\n12\n54\n0\n6\n12\n18\n6\n18\n18\n30\n12\n30\n0\n18\n0\n27\n18\n24\n0\n18\n0\n15\n24\n21\n6\n24\n3\n36\n6\n6\n6\n45\n21\n18\n0\n18\n6\n33\n3\n18\n0\n24\n15\n30\n0\n30\n24\n12\n6\n36\n0\n24\n3\n21\n24\n18\n15\n30\n3\n12\n6\n42\n12\n12\n12\n6\n0\n54\n6\n30\n15\n24\n18\n24\n6\n12\n0\n9\n6\n30\n0\n48\n0\n24\n0\n15\n12\n39\n12\n24\n6\n24\n6\n15\n30\n12\n6\n24\n0\n24\n3\n24\n12\n24\n6\n6\n18\n12\n4\n54\n6\n21\n18\n18\n0\n36\n6\n24\n9\n30\n12\n24\n9\n36\n6\n12\n18\n42\n3\n30\n0\n6\n9\n21\n6\n12\n30\n30\n6\n30\n0\n27\n12\n9\n18\n30\n0\n36\n0\n18\n9\n42\n6\n24\n12\n0\n6\n51\n12\n24\n12\n12\n0\n18\n6\n12\n18\n6\n6\n36\n3\n54\n9\n18\n6\n27\n12\n18\n0\n30\n0\n39\n9\n18\n18\n12\n9\n30\n6\n21\n12\n27\n18\n24\n0\n12\n0\n42\n18\n42\n6\n24\n15\n18\n0\n24\n12\n45\n12\n6\n0\n54\n0\n15\n21\n6\n6\n30\n6\n18\n12\n24\n18\n30\n6\n36\n0\n12\n3\n24\n12\n18\n18\n18\n12\n24\n0\n33\n12\n27\n6\n42\n0\n18\n6\n9\n15\n30\n6\n30\n6\n12\n6\n18\n6\n33\n15\n30\n0\n36\n3\n27\n21\n33\n24\n30\n9\n24\n0\n12\n18\n33\n6\n6\n0\n18\n3\n57\n12\n24\n18\n30\n9\n18\n0\n18\n12\n27\n12\n36\n0\n36\n6\n12\n6\n27\n12\n30\n9\n24\n6\n39\n18\n12\n24\n12\n0\n30\n0\n30\n6\n15\n15\n18\n3\n24\n18\n9\n12\n30\n9\n30\n0\n18\n6\n42\n18\n30\n0\n6\n10\n48\n0\n24\n12\n12\n18\n48\n0\n30\n3\n30\n15\n18\n6\n24\n18\n18\n0\n42\n6\n36\n15\n24\n0\n42\n12\n21\n24\n12\n12\n24\n0\n12\n6\n18\n18\n60\n6\n30\n0\n12\n0\n24\n0\n12\n18\n30\n15\n42\n0\n33\n30\n6\n6\n12\n0\n42\n3\n27\n6\n33\n12\n36\n12\n18\n0\n30\n6\n18\n12\n12\n0\n18\n6\n15\n27\n27\n6\n42\n6\n36\n9\n18\n30\n33\n9\n30\n0\n6\n6\n54\n6\n36\n24\n24\n0\n30\n3\n12\n6\n21\n24\n30\n0\n24\n0\n24\n12\n42\n9\n42\n21\n12\n12\n27\n12\n27\n6\n12\n0\n48\n6\n12\n18\n12\n12\n36\n6\n30\n0\n24\n0\n42\n12\n12\n0\n36\n0\n24\n15\n21\n21\n18\n6\n12\n9\n36\n18\n18\n15\n42\n0\n18\n6\n9\n18\n48\n12\n30\n9\n24\n3\n33\n6\n18\n18\n18\n0\n36\n3\n54\n24\n3\n12\n36\n9\n36\n6\n30\n12\n36\n12\n24\n0\n18\n6\n24\n6\n42\n0\n24\n18\n18\n0\n9\n30\n39\n12\n42\n0\n36\n0\n12\n12\n21\n12\n18\n12\n24\n6\n45\n6\n18\n24\n18\n0\n36\n0\n42\n15\n18\n6\n24\n6\n12\n12\n18\n12\n30\n6\n18\n0\n30\n1\n30\n9\n57\n9\n12\n9\n48\n6\n21\n24\n18\n12\n66\n0\n18\n6\n9\n24\n24\n24\n30\n12\n18\n0\n48\n6\n24\n18\n18\n0\n24\n3\n27\n18\n24\n12\n36\n6\n48\n6\n15\n18\n42\n6\n24\n0\n12\n12\n36\n6\n6\n24\n12\n3\n48\n0\n48\n18\n0\n12\n18\n0\n36\n6\n18\n9\n54\n15\n12\n12\n6\n6\n39\n6\n24\n18\n42\n0\n30\n0\n33\n18\n24\n18\n18\n9\n18\n0\n15\n18\n54\n0\n36\n0\n24\n0\n48\n24\n15\n18\n18\n12\n42\n9\n24\n12\n36\n21\n30\n0\n36\n12\n24\n3\n30\n0\n48\n15\n12\n6\n15\n18\n18\n18\n24\n0\n30\n0\n24\n24\n18\n9\n72\n0\n30\n6\n21\n18\n30\n6\n24\n0\n0\n6\n24\n18\n42\n12\n6\n15\n36\n0\n30\n18\n30\n12\n24\n0\n6\n0\n18\n12\n54\n9\n36\n9\n36\n9\n30\n6\n27\n27\n24\n0\n54\n6\n21\n18\n21\n6\n36\n15\n36\n3\n30\n12\n6\n18\n30\n0\n18\n6\n54\n0\n30\n21\n36\n9\n30\n6\n30\n24\n24\n6\n30\n0\n36\n12\n9\n24\n24\n12\n18\n9\n30\n0\n48\n12\n24\n12\n12\n0\n48\n0\n18\n12\n24\n24\n30\n6\n18\n12\n21\n12\n24\n0\n66\n0\n12\n0\n30\n9\n24\n24\n18\n13\n42\n3\n18\n18\n27\n24\n24\n0\n30\n6\n15\n18\n39\n12\n12\n9\n36\n12\n54\n12\n42\n18\n6\n0\n36\n0\n51\n18\n12\n0\n66\n12\n24\n0\n6\n24\n51\n12\n24\n0\n24\n0\n33\n6\n18\n18\n30\n6\n42\n3\n18\n30\n15\n15\n30\n0\n30\n6\n30\n12\n48\n12\n24\n12\n12\n9\n36\n6\n36\n6\n12\n0\n30\n0\n24\n21\n24\n15\n42\n12\n24\n6\n9\n18\n15\n9\n42\n0\n24\n12\n66\n12\n30\n24\n6\n9\n54\n0\n36\n12\n21\n12\n36\n0\n24\n3\n24\n15\n36\n6\n30\n24\n12\n6\n33\n6\n39\n21\n30\n0\n42\n6\n12\n30\n30\n18\n36\n0\n48\n3\n36\n12\n30\n18\n18\n0\n24\n0\n30\n6\n33\n21\n24\n6\n18\n12\n24\n12\n12\n15\n48\n0\n24\n6\n21\n21\n60\n6\n24\n12\n18\n0\n30\n12\n15\n12\n24\n0\n24\n3\n60\n27\n18\n12\n30\n3\n24\n9\n21\n12\n60\n18\n24\n0\n24\n9\n33\n6\n36\n12\n24\n15\n42\n6\n27\n36\n27\n6\n42\n0\n42\n6\n12\n15\n15\n24\n42\n18\n12\n0\n33\n6\n21\n18\n24\n0\n48\n3\n36\n9\n24\n24\n30\n6\n36\n0\n39\n18\n60\n6\n18\n0\n12\n6\n21\n27\n30\n0\n18\n6\n42\n6\n42\n18\n24\n9\n48\n0\n6\n6\n18\n18\n18\n6\n18\n15\n30\n4\n60\n12\n30\n30\n18\n0\n36\n0\n27\n18\n30\n18\n48\n9\n30\n12\n18\n6\n42\n9\n48\n0\n18\n6\n42\n6\n30\n24\n12\n3\n36\n0\n36\n36\n15\n18\n30\n0\n66\n0\n12\n18\n42\n9\n24\n15\n18\n12\n54\n6\n18\n21\n36\n0\n30\n6\n24\n24\n12\n6\n24\n9\n36\n12\n6\n12\n45\n12\n36\n0\n36\n0\n48\n3\n24\n18\n12\n24\n36\n0\n30\n12\n30\n21\n30\n0\n6\n15\n18\n15\n66\n12\n42\n3\n12\n0\n39\n12\n30\n12\n18\n0\n54\n6\n30\n24\n9\n12\n60\n12\n30\n12\n30\n24\n24\n18\n30\n0\n36\n0\n27\n9\n45\n18\n24\n12\n24\n0\n36\n24\n12\n6\n60\n0\n18\n0\n24\n15\n51\n9\n24\n12\n30\n12\n27\n18\n51\n18\n24\n0\n36\n6\n27\n27\n12\n30\n36\n6\n30\n0\n12\n6\n42\n0\n18\n0\n18\n0\n48\n12\n45\n24\n6\n15\n42\n6\n12\n18\n27\n9\n54\n0\n42\n3\n33\n12\n15\n12\n54\n18\n30\n6\n36\n18\n21\n30\n18\n0\n48\n3\n30\n18\n36\n6\n18\n0\n18\n12\n57\n24\n42\n6\n24\n0\n18\n12\n36\n18\n30\n12\n36\n3\n78\n0\n24\n6\n6\n36\n42\n0\n24\n0\n21\n15\n33\n6\n42\n18\n12\n3\n30\n12\n30\n27\n24\n0\n42\n12\n39\n12\n30\n12\n30\n15\n30\n6\n12\n24\n54\n6\n24\n0\n18\n6\n33\n12\n18\n24\n24\n7\n30\n0\n60\n24\n21\n12\n30\n0\n48\n6\n18\n15\n39\n12\n18\n18\n18\n0\n48\n12\n54\n18\n42\n0\n30\n0\n15\n30\n27\n18\n72\n0\n30\n15\n12\n12\n30\n18\n36\n0\n6\n3\n60\n15\n24\n18\n6\n18\n54\n6\n21\n24\n24\n12\n30\n0\n30\n6\n30\n15\n54\n6\n48\n12\n30\n12\n36\n0\n24\n3\n24\n0\n54\n6\n18\n30\n15\n6\n42\n9\n36\n0\n21\n30\n15\n12\n12\n0\n24\n3\n72\n0\n51\n39\n24\n12\n30\n3\n33\n18\n15\n12\n42\n0\n30\n12\n27\n24\n51\n12\n42\n12\n18\n3\n42\n12\n39\n18\n12\n0\n30\n0\n24\n21\n21\n21\n30\n6\n66\n12\n12\n6\n69\n21\n30\n0\n24\n6\n45\n12\n12\n18\n42\n12\n18\n0\n39\n30\n33\n12\n54\n0\n12\n0\n12\n18\n36\n9\n30\n9\n24\n9\n60\n12\n30\n12\n12\n0\n42\n9\n42\n18\n45\n24\n42\n6\n12\n9\n24\n6\n30\n12\n42\n0\n30\n6\n15\n15\n30\n12\n18\n12\n54\n6\n21\n30\n12\n33\n60\n0\n48\n0\n30\n15\n42\n6\n24\n24\n30\n0\n36\n18\n33\n18\n12\n0\n60\n0\n72\n15\n12\n9\n30\n12\n24\n15\n21\n24\n51\n12\n24\n0\n24\n6\n12\n6\n33\n24\n36\n9\n54\n6\n27\n24\n30\n6\n48\n0\n24\n3\n36\n27\n42\n15\n18\n18\n12\n6\n54\n6\n30\n15\n36\n0\n12\n12\n18\n24\n21\n18\n30\n3\n60\n0\n33\n12\n36\n18\n48\n0\n24\n1\n39\n12\n24\n18\n24\n9\n66\n6\n48\n24\n12\n12\n42\n0\n24\n6\n18\n12\n63\n6\n36\n24\n18\n0\n39\n12\n39\n24\n24\n0\n54\n6\n15\n24\n15\n24\n48\n3\n36\n12\n12\n24\n39\n18\n36\n0\n42\n6\n42\n6\n60\n24\n12\n18\n18\n0\n45\n6\n6\n6\n72\n0\n30\n6\n24\n9\n36\n12\n24\n9\n30\n15\n36\n18\n33\n24\n6\n0\n54\n0\n33\n36\n18\n24\n36\n6\n18\n6\n24\n18\n75\n6\n18\n0\n18\n0\n48\n9\n36\n18\n42\n9\n30\n0\n27\n36\n24\n15\n42\n0\n42\n18\n36\n12\n18\n12\n72\n9\n24\n0\n54\n18\n21\n24\n12\n0\n60\n0\n24\n24\n39\n12\n42\n18\n30\n6\n9\n12\n48\n12\n30\n0\n18\n12\n36\n15\n48\n18\n18\n3\n42\n6\n42\n18\n18\n24\n54\n0\n36\n0\n24\n36\n42\n0\n12\n27\n30\n6\n60\n6\n30\n24\n12\n0\n36\n3\n42\n12\n18\n12\n36\n9\n30\n0\n15\n18\n33\n12\n54\n0\n30\n6\n33\n21\n27\n30\n42\n12\n54\n9\n42\n24\n27\n6\n36\n0\n24\n12\n24\n12\n45\n24\n12\n6\n30\n12\n69\n12\n42\n12\n30\n0\n24\n0\n42\n18\n24\n15\n60\n9\n48\n18\n18\n24\n27\n12\n36\n0\n30\n0\n54\n9\n30\n18\n24\n15\n48\n0\n24\n24\n45\n24\n24\n0\n18\n6\n36\n9\n54\n15\n24\n12\n12\n6\n18\n12\n54\n18\n12\n0\n60\n3\n48\n30\n12\n18\n60\n6\n24\n3\n36\n12\n33\n12\n36\n0\n36\n6\n36\n3\n33\n24\n12\n13\n42\n12\n27\n18\n30\n12\n54\n0\n30\n12\n21\n39\n54\n6\n54\n18\n18\n0\n33\n12\n36\n36\n36\n0\n30\n0\n42\n33\n18\n18\n36\n12\n30\n3\n30\n12\n66\n6\n30\n0\n18\n12\n63\n18\n24\n6\n30\n12\n48\n9\n6\n24\n30\n12\n42\n0\n72\n0\n30\n12\n48\n3\n24\n15\n12\n12\n66\n18\n9\n36\n12\n0\n54\n0\n54\n18\n15\n30\n36\n6\n12\n0\n21\n18\n54\n12\n30\n0\n6\n0\n36\n15\n60\n18\n18\n15\n48\n6\n27\n24\n21\n12\n54\n0\n54\n9\n12\n24\n48\n12\n48\n15\n54\n6\n36\n6\n39\n24\n24\n0\n24\n3\n33\n24\n18\n18\n66\n12\n18\n12\n30\n12\n75\n15\n36\n0\n30\n9\n24\n6\n21\n24\n24\n12\n60\n0\n66\n36\n12\n18\n36\n0\n24\n6\n30\n18\n39\n18\n30\n12\n24\n9\n30\n6\n36\n18\n18\n0\n54\n12\n33\n24\n36\n6\n66\n0\n30\n6\n12\n12\n33\n24\n54\n0\n18\n3\n60\n3\n30\n24\n24\n21\n48\n0\n18\n30\n51\n12\n18\n0\n30\n12\n33\n15\n18\n12\n30\n27\n24\n0\n48\n12\n45\n6\n30\n0\n72\n0\n51\n18\n27\n27\n54\n9\n48\n12\n27\n30\n36\n18\n18\n0\n42\n3\n36\n9\n45\n30\n6\n6\n36\n3\n51\n24\n24\n18\n72\n0\n18\n6\n9\n36\n42\n0\n36\n9\n30\n12\n60\n30\n24\n15\n24\n0\n36\n6\n30\n27\n27\n18\n42\n12\n48\n0\n42\n0\n33\n24\n24\n0\n30\n0\n42\n12\n48\n9\n36\n9\n24\n6\n27\n36\n12\n9\n60\n0\n30\n12\n15\n18\n42\n18\n36\n18\n24\n7\n48\n12\n54\n24\n30\n0\n78\n0\n18\n18\n27\n24\n24\n6\n30\n12\n33\n18\n60\n15\n54\n0\n12\n12\n36\n12\n36\n24\n30\n18\n54\n0\n18\n18\n18\n24\n84\n0\n54\n0\n27\n15\n42\n6\n36\n12\n18\n9\n54\n6\n30\n30\n24\n0\n30\n9\n60\n30\n36\n6\n42\n12\n30\n6\n6\n30\n60\n0\n18\n0\n24\n9\n51\n18\n24\n33\n30\n0\n42\n12\n60\n18\n18\n36\n18\n0\n24\n0\n18\n9\n78\n12\n48\n24\n12\n0\n48\n6\n12\n18\n42\n0\n48\n0\n30\n27\n18\n6\n48\n3\n66\n21\n18\n18\n33\n12\n48\n0\n30\n6\n63\n21\n18\n36\n24\n15\n60\n6\n36\n30\n36\n0\n48\n0\n48\n3\n36\n30\n42\n18\n24\n24\n12\n6\n21\n6\n72\n12\n36\n0\n60\n6\n12\n18\n15\n24\n60\n9\n30\n0\n39\n30\n54\n12\n18\n0\n18\n3\n60\n9\n57\n24\n6\n18\n48\n6\n60\n18\n18\n9\n48\n0\n24\n12\n18\n18\n39\n6\n42\n15\n36\n6\n36\n18\n18\n30\n18\n0\n42\n6\n39\n27\n27\n18\n48\n12\n42\n12\n24\n18\n27\n9\n30\n0\n24\n9\n81\n12\n72\n12\n30\n6\n36\n0\n33\n42\n39\n30\n42\n0\n12\n3\n12\n6\n24\n18\n48\n12\n48\n3\n63\n24\n24\n27\n30\n0\n78\n6\n36\n18\n36\n30\n30\n12\n36\n12\n30\n6\n60\n12\n48\n0\n24\n0\n36\n21\n30\n24\n30\n12\n48\n0\n36\n12\n24\n27\n36\n0\n42\n12\n27\n24\n54\n6\n18\n12\n48\n0\n30\n6\n72\n24\n12\n0\n30\n3\n45\n24\n0\n18\n78\n15\n18\n18\n39\n18\n39\n9\n36\n0\n24\n6\n39\n12\n30\n18\n30\n16\n48\n0\n36\n30\n12\n12\n60\n0\n42\n3\n24\n21\n84\n33\n30\n12\n18\n18\n48\n12\n36\n12\n30\n0\n48\n9\n42\n36\n42\n6\n48\n3\n42\n0\n33\n24\n30\n12\n36\n0\n36\n6\n54\n12\n30\n30\n6\n21\n66\n0\n39\n24\n36\n24\n36\n0\n24\n12\n30\n15\n54\n12\n78\n30\n6\n0\n33\n12\n27\n30\n30\n0\n36\n6\n18\n36\n36\n6\n66\n3\n60\n6\n18\n30\n42\n0\n12\n0\n36\n6\n54\n6\n33\n24\n24\n12\n54\n0\n42\n12\n15\n12\n60\n0\n30\n0\n21\n18\n75\n18\n48\n18\n18\n15\n30\n24\n42\n33\n36\n0\n30\n6\n45\n24\n9\n30\n36\n3\n54\n15\n24\n18\n63\n18\n42\n0\n24\n0\n75\n6\n30\n9\n30\n15\n42\n12\n33\n36\n21\n24\n60\n0\n54\n9\n30\n30\n48\n12\n18\n12\n24\n0\n66\n12\n24\n18\n36\n0\n72\n6\n36\n15\n27\n27\n30\n6\n12\n18\n24\n6\n78\n15\n42\n0\n12\n6\n27\n24\n51\n18\n36\n12\n60\n3\n51\n30\n12\n24\n36\n0\n30\n0\n48\n12\n21\n6\n36\n24\n54\n6\n42\n6\n36\n36\n6\n0\n54\n12\n27\n15\n18\n18\n66\n6\n42\n0\n15\n30\n63\n12\n48\n0\n36\n3\n63\n12\n36\n30\n18\n9\n48\n3\n48\n36\n30\n12\n42\n0\n72\n6\n36\n30\n30\n12\n24\n12\n6\n15\n75\n18\n30\n6\n36\n0\n24\n0\n18\n36\n48\n18\n60\n18\n60\n12\n33\n12\n33\n15\n72\n0\n18\n9\n54\n15\n21\n30\n36\n12\n30\n0\n42\n24\n48\n18\n36\n0\n24\n6\n18\n15\n81\n12\n12\n27\n36\n12\n30\n6\n36\n18\n24\n0\n48\n6\n36\n36\n27\n6\n48\n9\n36\n3\n36\n36\n36\n24\n30\n0\n24\n1\n42\n6\n66\n27\n24\n18\n48\n12\n51\n18\n24\n18\n84\n0\n24\n6\n12\n9\n63\n18\n48\n9\n30\n0\n36\n12\n33\n24\n30\n0\n72\n0\n42\n48\n36\n18\n42\n12\n42\n15\n24\n12\n60\n15\n24\n0\n12\n21\n72\n3\n42\n30\n24\n18\n36\n6\n42\n18\n30\n12\n42\n0\n48\n12\n12\n24\n24\n18\n66\n6\n24\n0\n93\n12\n51\n30\n12\n0\n54\n6\n18\n27\n24\n24\n36\n12\n30\n0\n45\n18\n60\n6\n54\n0\n24\n0\n51\n24\n21\n18\n30\n6\n72\n6\n6\n18\n21\n36\n42\n0\n48\n12\n27\n24\n36\n6\n30\n27\n30\n6\n39\n18\n51\n36\n30\n0\n42\n0\n66\n18\n36\n6\n66\n9\n24\n12\n24\n24\n78\n12\n36\n0\n36\n12\n60\n15\n42\n24\n6\n15\n54\n0\n33\n30\n21\n30\n42\n0\n54\n0\n24\n9\n60\n9\n36\n24\n24\n6\n66\n12\n48\n18\n54\n0\n30\n0\n30\n39\n30\n18\n48\n6\n42\n12\n33\n24\n33\n12\n60\n0\n18\n6\n42\n24\n42\n24\n6\n12\n72\n6\n42\n30\n18\n9\n30\n0\n24\n15\n30\n18\n60\n12\n54\n15\n24\n0\n48\n24\n33\n12\n36\n0\n66\n6\n36\n18\n21\n30\n72\n3\n24\n9\n27\n30\n30\n18\n42\n0\n42\n0\n72\n6\n39\n42\n24\n18\n60\n3\n24\n18\n36\n18\n30\n0\n54\n6\n27\n33\n60\n12\n24\n24\n18\n18\n30\n12\n21\n33\n48\n0\n78\n12\n78\n12\n30\n12\n42\n12\n48\n0\n24\n12\n75\n18\n24\n0\n18\n0\n33\n24\n30\n21\n42\n15\n30\n12\n39\n30\n51\n12\n54\n0\n36\n12\n18\n12\n48\n24\n78\n18\n18\n6\n78\n6\n24\n30\n12\n0\n42\n0\n45\n18\n15\n27\n42\n0\n54\n18\n36\n18\n36\n6\n48\n0\n30\n12\n36\n21\n45\n6\n24\n7\n54\n0\n27\n42\n33\n24\n72\n0\n42\n0\n48\n24\n45\n18\n18\n15\n36\n15\n66\n6\n66\n30\n18\n0\n48\n0\n27\n39\n30\n18\n66\n27\n12\n12\n18\n24\n60\n6\n66\n0\n42\n0\n42\n6\n33\n21\n36\n12\n42\n6\n21\n36\n33\n21\n48\n0\n66\n12\n6\n18\n75\n24\n36\n12\n18\n0\n81\n12\n42\n30\n36\n0\n24\n0\n30\n30\n30\n6\n60\n9\n60\n6\n24\n30\n30\n6\n30\n0\n30\n12\n75\n18\n30\n24\n24\n15\n78\n0\n42\n24\n18\n30\n42\n0\n30\n12\n21\n12\n48\n9\n60\n21\n30\n12\n24\n24\n39\n21\n24\n0\n54\n3\n39\n30\n33\n24\n72\n12\n60\n0\n18\n24\n57\n12\n24\n0\n24\n3\n90\n9\n12\n21\n36\n12\n30\n18\n84\n24\n30\n9\n60\n0\n36\n18\n18\n24\n78\n18\n24\n18\n48\n6\n24\n0\n45\n30\n24\n0\n66\n3\n60\n36\n21\n42\n42\n6\n30\n6\n33\n12\n60\n21\n36\n0\n6\n6\n36\n15\n36\n30\n48\n21\n48\n0\n39\n36\n36\n6\n54\n0\n66\n3\n18\n18\n33\n24\n36\n18\n30\n9\n66\n6\n15\n36\n24\n0\n96\n6\n30\n12\n42\n6\n36\n6\n36\n9\n27\n36\n42\n12\n42\n0\n18\n6\n51\n12\n78\n18\n30\n9\n54\n12\n39\n24\n24\n33\n66\n0\n36\n9\n45\n33\n36\n12\n18\n27\n36\n0\n78\n12\n48\n24\n30\n0\n42\n9\n48\n21\n18\n9\n60\n12\n54\n6\n21\n24\n72\n3\n66\n0\n18\n18\n33\n12\n21\n36\n36\n6\n36\n6\n60\n36\n36\n18\n48\n0\n24\n0\n30\n24\n87\n24\n24\n27\n42\n6\n60\n18\n66\n6\n18\n0\n36\n6\n39\n36\n30\n18\n36\n9\n30\n0\n18\n18\n51\n12\n48\n0\n54\n0\n48\n18\n36\n30\n36\n30\n66\n3\n12\n18\n15\n39\n60\n0\n24\n12\n66\n6\n54\n12\n48\n6\n18\n7\n30\n24\n48\n18\n30\n0\n84\n0\n30\n48\n12\n15\n60\n9\n42\n18\n42\n18\n42\n18\n48\n0\n30\n9\n48\n21\n69\n36\n12\n12\n48\n0\n57\n18\n24\n24\n66\n0\n36\n6\n24\n21\n69\n6\n54\n12\n30\n18\n72\n18\n30\n30\n18\n0\n42\n0\n42\n42\n12\n18\n42\n6\n54\n9\n42\n12\n72\n18\n24\n0\n24\n3\n78\n0\n24\n24\n30\n15\n60\n6\n42\n30\n39\n21\n36\n0\n54\n12\n27\n24\n42\n24\n72\n21\n30\n0\n48\n18\n24\n30\n12\n0\n30\n3\n24\n15\n72\n33\n42\n6\n24\n24\n12\n24\n66\n12\n60\n0\n24\n6\n63\n12\n42\n18\n24\n18\n84\n6\n30\n24\n24\n6\n90\n0\n72\n6\n21\n24\n30\n18\n18\n30\n24\n6\n66\n18\n54\n18\n36\n0\n36\n12\n60\n27\n30\n18\n90\n18\n18\n0\n18\n24\n48\n24\n30\n0\n36\n6\n36\n18\n66\n36\n30\n3\n66\n3\n57\n48\n12\n18\n36\n0\n48\n6\n36\n21\n48\n0\n60\n12\n36\n12\n72\n0\n36\n30\n30\n0\n48\n0\n33\n30\n48\n9\n54\n9\n36\n24\n18\n30\n42\n18\n54\n0\n12\n0\n54\n12\n21\n24\n30\n21\n72\n0\n66\n24\n27\n18\n36\n0\n24\n0\n45\n24\n78\n0\n42\n21\n24\n12\n39\n30\n54\n30\n24\n0\n84\n15\n24\n24\n9\n30\n54\n9\n48\n6\n33\n18\n57\n18\n30\n0\n60\n3\n54\n27\n33\n30\n36\n24\n42\n0\n54\n18\n39\n24\n54\n0\n60\n18\n24\n15\n75\n12\n24\n12\n42\n0\n39\n12\n36\n36\n36\n0\n30\n3\n66\n42\n15\n24\n72\n12\n48\n12\n42\n12\n48\n15\n24\n0\n18\n18\n60\n6\n60\n18\n36\n9\n24\n6\n27\n36\n30\n24\n90\n0\n60\n3\n21\n18\n54\n24\n48\n18\n18\n12\n51\n24\n39\n18\n18\n0\n72\n12\n42\n21\n36\n24\n36\n6\n36\n0\n33\n18\n42\n0\n60\n0\n18\n6\n42\n21\n39\n39\n36\n13\n84\n6\n24\n18\n30\n24\n78\n0\n36\n3\n54\n39\n51\n18\n30\n21\n24\n3\n60\n12\n87\n42\n30\n0\n36\n6\n30\n15\n36\n12\n54\n18\n42\n12\n27\n24\n84\n15\n42\n0\n18\n9\n54\n18\n30\n30\n48\n12\n72\n0\n54\n42\n9\n12\n36\n0\n60\n0\n27\n21\n78\n18\n42\n30\n30\n6\n54\n6\n30\n18\n24\n0\n60\n12\n42\n36\n48\n24\n54\n6\n36\n15\n12\n48\n21\n12\n30\n0\n36\n0\n102\n6\n18\n12\n24\n9\n60\n12\n48\n24\n33\n30\n66\n0\n30\n12\n30\n15\n60\n12\n54\n36\n30\n0\n36\n6\n72\n18\n36\n0\n54\n0\n30\n36\n9\n15\n60\n0\n60\n15\n39\n12\n63\n18\n42\n0\n30\n18\n60\n21\n57\n30\n0\n18\n54\n3\n75\n30\n48\n24\n42\n0\n24\n12\n36\n42\n57\n9\n48\n9\n36\n6\n45\n12\n24\n48\n54\n0\n66\n0\n45\n33\n30\n18\n54\n18\n36\n0\n36\n6\n54\n30\n54\n0\n36\n0\n66\n12\n42\n21\n24\n18\n48\n6\n21\n48\n42\n12\n60\n0\n84\n12\n0\n12\n54\n24\n36\n18\n18\n12\n81\n18\n33\n18\n12\n0\n66\n3\n66\n6\n33\n48\n48\n6\n24\n24\n36\n18\n60\n6\n36\n0\n24\n6\n39\n21\n42\n18\n42\n12\n60\n0\n24\n30\n33\n36\n72\n0\n30\n0\n36\n36\n42\n12\n36\n15\n24\n15\n75\n30\n63\n27\n24\n0\n42\n6\n63\n30\n18\n12\n108\n9\n48\n12\n24\n12\n72\n18\n30\n0\n54\n6\n30\n9\n63\n27\n48\n15\n36\n6\n48\n36\n18\n12\n54\n0\n42\n9\n36\n36\n63\n18\n36\n24\n36\n0\n75\n6\n63\n24\n36\n0\n48\n6\n27\n39\n30\n18\n30\n9\n54\n18\n36\n18\n39\n21\n66\n0\n30\n0\n54\n18\n42\n36\n12\n24\n108\n0\n30\n24\n42\n12\n48\n0\n24\n0\n15\n9\n48\n18\n66\n24\n24\n12\n54\n12\n36\n21\n54\n0\n54\n18\n45\n42\n36\n24\n42\n3\n36\n0\n42\n48\n42\n12\n36\n0\n36\n1\n60\n18\n36\n18\n36\n15\n54\n9\n60\n30\n24\n21\n48\n0\n24\n18\n24\n18\n90\n6\n72\n15\n36\n9\n48\n6\n36\n42\n48\n0\n78\n3\n54\n27\n18\n36\n48\n15\n54\n12\n30\n24\n84\n12\n18\n0\n18\n12\n105\n12\n24\n30\n30\n18\n36\n0\n60\n30\n27\n12\n48\n0\n90\n6\n18\n18\n33\n21\n42\n24\n24\n12\n45\n24\n60\n36\n36\n0\n66\n6\n27\n15\n42\n24\n60\n12\n18\n9\n30\n18\n84\n12\n72\n0\n12\n6\n42\n21\n45\n12\n18\n9\n96\n12\n21\n30\n30\n24\n66\n0\n48\n12\n42\n18\n36\n18\n24\n24\n24\n0\n30\n12\n27\n42\n18\n0\n72\n0\n84\n27\n54\n15\n102\n12\n36\n6\n39\n36\n36\n15\n36\n0\n30\n15\n57\n12\n57\n42\n30\n9\n60\n6\n27\n42\n27\n30\n36\n0\n54\n6\n24\n21\n78\n12\n42\n18\n18\n12\n84\n18\n54\n18\n48\n0\n66\n12\n15\n36\n30\n18\n72\n9\n66\n0\n27\n18\n24\n6\n78\n0\n42\n6\n81\n27\n27\n36\n24\n24\n48\n0\n72\n18\n39\n30\n42\n0\n18\n18\n30\n24\n78\n6\n18\n18\n36\n0\n48\n30\n84\n6\n18\n0\n54\n0\n42\n36\n12\n30\n90\n12\n48\n18\n24\n18\n21\n18\n48\n0\n60\n0\n60\n6\n30\n42\n24\n18\n66\n0\n27\n36\n24\n18\n54\n0\n48\n6\n30\n18\n90\n15\n42\n9\n48\n18\n42\n6\n45\n24\n36\n0\n48\n0\n78\n39\n27\n12\n42\n27\n48\n6\n45\n18\n72\n36\n48\n0\n18\n9\n66\n9\n54\n33\n18\n18\n66\n12\n39\n36\n45\n12\n72\n0\n48\n12\n21\n39\n33\n18\n60\n18\n36\n0\n78\n18\n39\n36\n24\n0\n30\n0\n30\n30\n54\n21\n66\n6\n30\n21\n39\n18\n60\n15\n72\n0\n30\n18\n45\n12\n39\n18\n60\n6\n66\n15\n36\n30\n12\n18\n60\n0\n60\n0\n18\n33\n57\n18\n24\n24\n42\n6\n66\n12\n81\n42\n18\n0\n36\n6\n42\n18\n24\n24\n72\n0\n18\n0\n30\n30\n87\n18\n36\n0\n42\n3\n45\n12\n36\n42\n24\n25\n30\n6\n72\n24\n18\n18\n60\n0\n102\n12\n42\n12\n90\n12\n24\n27\n24\n12\n69\n24\n30\n18\n42\n0\n48\n0\n42\n45\n39\n15\n60\n18\n30\n12\n33\n24\n72\n18\n36\n0\n24\n12\n51\n24\n39\n36\n24\n6\n120\n0\n72\n24\n30\n30\n30\n0\n24\n12\n72\n18\n54\n3\n84\n30\n30\n21\n42\n24\n30\n18\n30\n0\n54\n0\n36\n30\n24\n30\n72\n9\n72\n6\n30\n24\n36\n24\n30\n0\n30\n0\n90\n12\n48\n27\n24\n6\n54\n12\n39\n36\n18\n18\n78\n0\n36\n12\n18\n39\n66\n6\n54\n18\n36\n0\n54\n18\n42\n12\n30\n0\n78\n0\n48\n45\n27\n36\n36\n9\n54\n15\n6\n12\n99\n15\n48\n0\n24\n3\n60\n12\n45\n36\n36\n30\n24\n12\n57\n30\n42\n18\n54\n0\n36\n6\n45\n24\n63\n30\n60\n12\n42\n6\n102\n18\n30\n33\n18\n0\n84\n12\n54\n24\n39\n12\n42\n0\n36\n0\n54\n24\n60\n12\n42\n0\n48\n6\n30\n9\n93\n24\n18\n21\n60\n6\n21\n36\n18\n54\n102\n0\n30\n18\n36\n21\n48\n12\n30\n27\n42\n3\n54\n12\n66\n36\n36\n0\n48\n9\n45\n33\n30\n9\n84\n18\n30\n12\n33\n36\n51\n12\n54\n0\n36\n18\n42\n12\n30\n36\n24\n9\n72\n0\n48\n30\n36\n6\n78\n0\n42\n0\n18\n24\n63\n21\n36\n18\n24\n15\n66\n0\n42\n27\n54\n0\n30\n9\n51\n45\n45\n24\n48\n12\n72\n12\n33\n24\n39\n30\n66\n0\n18\n6\n69\n12\n36\n24\n36\n18\n90\n6\n60\n24\n36\n27\n36\n0\n60\n18\n33\n21\n84\n12\n36\n30\n18\n0\n33\n24\n51\n30\n24\n0\n84\n0\n57\n33\n36\n21\n84\n12\n30\n12\n33\n36\n63\n18\n24\n0\n30\n6\n90\n21\n66\n30\n30\n24\n36\n0\n54\n12\n51\n18\n78\n0\n36\n0\n18\n18\n54\n21\n48\n12\n66\n18\n21\n18\n33\n21\n42\n0\n66\n6\n48\n54\n21\n30\n66\n12\n66\n0\n24\n24\n63\n24\n36\n0\n42\n3\n60\n18\n30\n6\n36\n9\n54\n6\n72\n48\n36\n15\n54\n0\n30\n27\n12\n18\n60\n12\n66\n15\n48\n10\n84\n12\n39\n42\n12\n0\n66\n6\n24\n18\n21\n36\n54\n24\n24\n12\n51\n18\n66\n12\n90\n0\n18\n6\n87\n15\n75\n24\n30\n15\n60\n0\n24\n42\n24\n24\n48\n0\n84\n6\n51\n39\n60\n12\n18\n30\n36\n12\n60\n12\n60\n48\n36\n0\n54\n6\n42\n12\n6\n18\n78\n6\n48\n12\n12\n36\n84\n0\n48\n0\n54\n3\n48\n18\n45\n51\n54\n6\n72\n6\n51\n30\n45\n30\n48\n0\n36\n6\n36\n15\n78\n24\n42\n24\n24\n0\n90\n18\n36\n24\n24\n0\n36\n0\n36\n30\n30\n30\n66\n6\n78\n21\n30\n12\n21\n15\n60\n0\n36\n12\n66\n21\n36\n24\n30\n18\n60\n9\n54\n48\n24\n18\n48\n0\n30\n6\n42\n18\n81\n18\n54\n27\n24\n12\n30\n18\n84\n30\n24\n0\n102\n9\n42\n42\n36\n24\n90\n3\n30\n0\n60\n30\n42\n18\n24\n0\n18\n0\n78\n12\n42\n27\n42\n18\n66\n18\n45\n18\n42\n9\n84\n0\n54\n6\n15\n54\n63\n18\n54\n24\n24\n9\n57\n24\n45\n54\n36\n0\n60\n0\n66\n27\n33\n18\n30\n9\n60\n24\n30\n12\n54\n21\n24\n0\n12\n18\n108\n15\n66\n12\n30\n27\n66\n0\n36\n30\n36\n24\n66\n0\n60\n0\n9\n24\n54\n12\n90\n15\n42\n0\n51\n30\n18\n30\n48\n0\n84\n9\n48\n21\n54\n30\n24\n18\n36\n12\n45\n18\n96\n6\n30\n0\n30\n9\n30\n24\n42\n24\n24\n15\n66\n6\n69\n36\n15\n15\n84\n0\n36\n15\n48\n27\n45\n18\n42\n30\n36\n0\n66\n6\n72\n30\n48\n0\n42\n3\n51\n39\n30\n33\n78\n12\n24\n18\n30\n18\n105\n21\n72\n0\n42\n12\n39\n18\n27\n42\n24\n6\n66\n3\n60\n42\n30\n30\n60\n0\n54\n6\n54\n24\n57\n6\n54\n6\n24\n24\n54\n12\n57\n27\n42\n0\n48\n6\n36\n27\n57\n12\n84\n12\n60\n0\n12\n30\n54\n24\n48\n0\n18\n3\n105\n36\n48\n42\n24\n18\n48\n6\n30\n36\n45\n42\n42\n0\n54\n9\n36\n12\n48\n12\n54\n30\n30\n6\n48\n6\n51\n18\n36\n0\n102\n6\n18\n30\n33\n24\n48\n18\n60\n12\n60\n30\n45\n12\n36\n0\n54\n12\n60\n6\n48\n54\n12\n13\n60\n0\n72\n18\n24\n6\n90\n0\n48\n12\n15\n42\n96\n18\n36\n18\n36\n6\n78\n24\n48\n18\n30\n0\n48\n18\n78\n42\n24\n30\n60\n6\n60\n12\n18\n12\n42\n30\n42\n0\n24\n0\n81\n9\n54\n18\n60\n33\n48\n0\n27\n54\n51\n27\n90\n0\n60\n18\n24\n18\n54\n24\n36\n12\n42\n0\n87\n24\n33\n18\n24\n0\n96\n0\n87\n36\n30\n15\n42\n12\n36\n24\n24\n36\n42\n21\n48\n0\n30\n6\n42\n18\n48\n24\n24\n18\n84\n3\n36\n42\n42\n36\n72\n0\n54\n6\n30\n15\n60\n6\n78\n30\n24\n6\n72\n6\n66\n45\n24\n0\n42\n21\n36\n30\n36\n18\n48\n12\n30\n0\n39\n24\n102\n18\n36\n0\n12\n6\n54\n6\n30\n33\n66\n21\n90\n3\n78\n36\n9\n18\n36\n0\n84\n0\n30\n30\n93\n24\n30\n24\n30\n15\n63\n12\n48\n30\n54\n0\n48\n0\n54\n42\n42\n30\n78\n0\n36\n24\n39\n24\n60\n12\n78\n0\n60\n6\n51\n30\n36\n36\n30\n18\n60\n0\n30\n30\n51\n24\n60\n0\n42\n3\n24\n9\n54\n21\n24\n33\n30\n24\n66\n24\n69\n18\n30\n0\n102\n15\n54\n24\n15\n30\n120\n6\n30\n3\n51\n24\n54\n12\n30\n0\n36\n6\n36\n12\n90\n42\n12\n12\n60\n12\n60\n24\n42\n12\n90\n0\n24\n12\n42\n30\n30\n6\n78\n21\n42\n0\n54\n24\n27\n54\n24\n0\n66\n6\n45\n30\n12\n30\n42\n12\n84\n15\n36\n18\n84\n24\n36\n0\n30\n18\n72\n18\n60\n24\n48\n12\n54\n6\n36\n54\n42\n12\n42\n0\n60\n0\n51\n48\n54\n9\n36\n27\n24\n6\n84\n18\n48\n30\n42\n0\n78\n0\n48\n27\n27\n48\n42\n18\n36\n0\n39\n18\n99\n24\n102\n0\n18\n0\n48\n18\n72\n15\n36\n12\n84\n12\n24\n12\n30\n39\n84\n0\n36\n12\n39\n39\n63\n24\n42\n24\n66\n6\n72\n18\n18\n24\n30\n0\n60\n6\n48\n42\n36\n15\n78\n6\n48\n30\n12\n36\n54\n12\n36\n0\n42\n6\n45\n6\n69\n24\n72\n21\n48\n0\n57\n48\n12\n24\n48\n0\n48\n3\n48\n15\n78\n24\n60\n18\n12\n12\n111\n24\n54\n24\n24\n0\n48\n6\n36\n33\n42\n6\n54\n9\n72\n18\n27\n30\n30\n12\n54\n0\n66\n4\n78\n21\n24\n54\n18\n24\n54\n6\n60\n24\n54\n21\n78\n0\n36\n18\n54\n30\n66\n18\n48\n30\n24\n0\n42\n12\n99\n36\n30\n0\n90\n6\n18\n30\n30\n24\n78\n6\n66\n9\n24\n42\n78\n30\n42\n0\n18\n12\n102\n6\n33\n24\n18\n12\n66\n9\n54\n24\n24\n36\n84\n0\n60\n6\n39\n15\n78\n12\n42\n21\n42\n18\n42\n18\n18\n42\n24\n0\n48\n3\n105\n51\n42\n30\n42\n18\n72\n0\n24\n24\n102\n6\n36\n0\n36\n9\n99\n12\n48\n21\n48\n18\n42\n6\n36\n42\n18\n12\n78\n0\n48\n30\n30\n18\n36\n30\n42\n9\n42\n6\n60\n12\n39\n30\n24\n0\n78\n0\n48\n30\n39\n27\n102\n24\n30\n12\n51\n12\n66\n9\n48\n0\n30\n18\n45\n39\n87\n30\n36\n9\n72\n0\n60\n24\n30\n36\n54\n0\n48\n0\n45\n36\n45\n18\n42\n27\n60\n9\n66\n12\n78\n42\n18\n0\n60\n6\n60\n33\n36\n24\n96\n12\n18\n12\n12\n36\n72\n0\n78\n0\n36\n6\n60\n24\n27\n51\n42\n24\n84\n12\n57\n48\n30\n24\n42\n0\n60\n12\n24\n18\n96\n12\n30\n30\n30\n0\n93\n18\n48\n18\n60\n0\n48\n6\n54\n36\n30\n12\n42\n9\n60\n18\n12\n24\n69\n6\n60\n0\n54\n6\n33\n15\n60\n36\n30\n18\n90\n3\n72\n24\n54\n54\n42\n0\n18\n9\n60\n30\n84\n18\n48\n24\n12\n6\n66\n36\n24\n27\n24\n0\n42\n12\n39\n42\n27\n18\n108\n9\n78\n0\n48\n12\n54\n30\n30\n0\n36\n0\n48\n12\n75\n39\n30\n6\n42\n9\n66\n30\n33\n18\n96\n0\n48\n18\n39\n36\n102\n12\n54\n18\n24\n9\n45\n24\n72\n30\n36\n0\n78\n6\n63\n36\n36\n21\n60\n9\n36\n12\n54\n24\n78\n27\n42\n0\n42\n18\n60\n9\n24\n24\n54\n39\n84\n0\n27\n36\n39\n12\n84\n0\n66\n0\n21\n30\n30\n42\n66\n18\n18\n18\n78\n12\n48\n42\n36\n0\n90\n6\n48\n33\n39\n24\n48\n15\n54\n15\n54\n24\n48\n18\n60\n0\n24\n0\n48\n24\n78\n24\n36\n9\n90\n12\n42\n24\n30\n45\n54\n0\n66\n12\n24\n12\n60\n6\n48\n33\n48\n0\n60\n6\n51\n54\n12\n0\n30\n0\n69\n21\n42\n15\n72\n15\n48\n21\n33\n36\n96\n6\n30\n0\n54\n6\n87\n30\n42\n30\n36\n13\n42\n6\n84\n48\n18\n18\n72\n0\n54\n12\n30\n30\n75\n24\n36\n24\n42\n18\n78\n12\n36\n30\n72\n0\n48\n6\n33\n36\n57\n36\n66\n6\n54\n0\n27\n36\n66\n12\n90\n0\n24\n3\n96\n24\n27\n24\n18\n24\n108\n12\n42\n48\n24\n18\n30\n0\n54\n18\n48\n12\n75\n18\n90\n21\n36\n12\n72\n12\n45\n24\n24\n0\n114\n0\n27\n30\n39\n33\n48\n12\n54\n12\n18\n42\n45\n27\n48\n0\n48\n6\n90\n9\n60\n42\n36\n12\n48\n0\n36\n42\n42\n18\n78\n0\n30\n6\n24\n33\n78\n9\n84\n30\n18\n15\n63\n18\n51\n30\n48\n0\n72\n6\n36\n51\n24\n30\n48\n21\n96\n6\n24\n6\n93\n12\n48\n0\n18\n6\n69\n18\n36\n18\n24\n18\n24\n6\n54\n36\n51\n33\n96\n0\n36\n15\n27\n30\n54\n30\n42\n12\n36\n0\n117\n36\n54\n36\n24\n0\n96\n3\n72\n36\n57\n27\n54\n6\n54\n21\n36\n12\n66\n33\n60\n0\n30\n24\n24\n15\n63\n30\n42\n24\n78\n9\n39\n30\n24\n24\n138\n0\n42\n0\n54\n24\n57\n12\n30\n24\n42\n18\n54\n6\n60\n33\n24\n0\n72\n6\n84\n24\n42\n6\n66\n15\n36\n0\n42\n48\n51\n18\n66\n0\n60\n3\n60\n12\n60\n57\n42\n9\n72\n12\n60\n42\n27\n24\n60\n0\n42\n18\n24\n30\n48\n30\n36\n18\n30\n9\n78\n12\n51\n18\n30\n0\n60\n0\n12\n57\n51\n18\n78\n6\n102\n12\n30\n24\n48\n27\n36\n0\n30\n12\n126\n6\n27\n36\n30\n18\n66\n0\n60\n30\n48\n36\n48\n0\n24\n6\n39\n24\n96\n12\n90\n33\n36\n6\n39\n6\n90\n27\n36\n0\n60\n12\n45\n42\n30\n30\n72\n12\n36\n9\n39\n36\n69\n24\n48\n0\n36\n6\n66\n15\n72\n39\n36\n27\n54\n18\n57\n30\n42\n12\n60\n0\n84\n24\n36\n27\n72\n12\n48\n21\n60\n0\n51\n30\n27\n30\n90\n0\n78\n0\n42\n57\n12\n30\n48\n18\n42\n6\n48\n24\n90\n15\n42\n0\n12\n15\n84\n24\n72\n18\n48\n21\n66\n3\n54\n42\n30\n24\n48\n0\n36\n18\n27\n12\n42\n9\n108\n18\n36\n12\n96\n24\n21\n30\n24\n0\n96\n9\n54\n18\n75\n30\n54\n18\n36\n0\n39\n18\n84\n18\n42\n0\n24\n6\n54\n18\n57\n42\n24\n9\n84\n18\n48\n42\n27\n30\n78\n0\n60\n0\n30\n48\n36\n6\n30\n36\n6\n10\n78\n12\n51\n48\n48\n0\n90\n0\n75\n9\n42\n24\n48\n15\n72\n12\n33\n42\n108\n12\n54\n0\n54\n18\n51\n42\n36\n48\n48\n12\n72\n0\n42\n18\n45\n30\n66\n0\n78\n3\n36\n15\n78\n30\n30\n30\n30\n15\n102\n12\n54\n18\n30\n0\n36\n6\n81\n48\n12\n24\n108\n6\n78\n18\n24\n36\n33\n18\n30\n0\n30\n0\n108\n21\n54\n42\n18\n18\n90\n6\n30\n48\n69\n36\n48\n0\n24\n15\n24\n15\n84\n24\n114\n6\n30\n0\n48\n6\n60\n42\n24\n0\n102\n12\n42\n42\n27\n21\n78\n9\n42\n24\n51\n24\n42\n12\n48\n0\n60\n12\n66\n6\n42\n24\n30\n24\n42\n0\n78\n24\n54\n12\n66\n0\n30\n6\n24\n51\n99\n18\n60\n24\n42\n18\n54\n6\n45\n60\n36\n0\n54\n6\n39\n39\n39\n30\n66\n18\n72\n0\n51\n24\n102\n12\n54\n0\n24\n0\n102\n12\n48\n24\n42\n36\n60\n0\n12\n48\n18\n12\n54\n0\n84\n18\n39\n9\n84\n30\n66\n18\n48\n15\n72\n48\n39\n42\n48\n0\n60\n0\n84\n30\n45\n33\n54\n6\n54\n30\n33\n30\n90\n6\n54\n0\n24\n6\n72\n27\n78\n12\n24\n15\n66\n0\n54\n36\n21\n42\n114\n0\n60\n3\n30\n33\n54\n27\n30\n33\n60\n6\n54\n12\n48\n33\n36\n0\n42\n12\n45\n39\n24\n36\n96\n18\n24\n12\n33\n18\n99\n18\n66\n0\n36\n0\n51\n24\n30\n30\n36\n15\n84\n6\n102\n48\n48\n18\n60\n0\n72\n12\n36\n42\n60\n12\n24\n21\n30\n0\n54\n18\n60\n18\n42\n0\n66\n6\n24\n24\n54\n15\n78\n12\n42\n27\n27\n30\n51\n27\n78\n0\n48\n6\n120\n27\n48\n42\n24\n12\n54\n6\n54\n24\n48\n36\n66\n0\n78\n9\n57\n21\n48\n18\n54\n33\n24\n30\n84\n18\n45\n33\n30\n0\n126\n9\n36\n30\n27\n30\n66\n18\n54\n0\n36\n42\n48\n6\n42\n0\n54\n6\n57\n12\n84\n54\n48\n6\n60\n6\n63\n18\n42\n36\n78\n0\n24\n24\n33\n24\n105\n24\n66\n27\n48\n0\n48\n30\n60\n30\n54\n0\n42\n3\n75\n48\n24\n12\n66\n12\n96\n6\n30\n12\n87\n21\n36\n0\n30\n24\n69\n12\n57\n30\n48\n24\n54\n0\n42\n54\n24\n24\n72\n0\n60\n0\n48\n24\n69\n24\n42\n18\n36\n12\n66\n24\n36\n42\n18\n0\n78\n9\n48\n36\n42\n42\n36\n12\n36\n21\n78\n18\n48\n12\n102\n0\n18\n12\n54\n24\n45\n27\n42\n13\n108\n12\n39\n24\n42\n27\n102\n0\n60\n6\n39\n24\n54\n12\n54\n24\n24\n0\n114\n24\n63\n48\n30\n0\n48\n6\n69\n36\n18\n12\n72\n6\n48\n18\n33\n54\n117\n12\n42\n0\n66\n12\n48\n6\n54\n36\n42\n21\n102\n6\n48\n54\n33\n30\n48\n0\n72\n0\n30\n24\n75\n24\n84\n30\n30\n0\n72\n18\n30\n42\n54\n0\n60\n12\n36\n45\n42\n12\n96\n6\n66\n0\n12\n36\n78\n36\n42\n0\n36\n0\n78\n24\n48\n24\n18\n30\n90\n15\n96\n18\n27\n21\n54\n0\n24\n21\n48\n27\n84\n18\n48\n42\n36\n6\n66\n12\n108\n12\n42\n0\n48\n9\n27\n60\n21\n36\n84\n6\n36\n18\n42\n18\n54\n18\n60\n0\n60\n15\n72\n9\n99\n42\n12\n12\n60\n0\n57\n42\n18\n18\n78\n0\n42\n6\n36\n36\n63\n9\n42\n15\n30\n18\n78\n6\n24\n48\n42\n0\n102\n12\n75\n45\n42\n30\n84\n24\n66\n9\n24\n30\n90\n24\n42\n0\n24\n3\n84\n21\n84\n33\n66\n24\n36\n6\n36\n48\n51\n18\n72\n0\n66\n18\n54\n30\n24\n18\n48\n18\n30\n0\n102\n12\n45\n36\n24\n0\n102\n3\n42\n15\n42\n54\n54\n21\n66\n24\n66\n30\n102\n3\n66\n0\n48\n12\n24\n30\n45\n36\n54\n6\n78\n9\n48\n24\n39\n36\n96\n0\n66\n6\n27\n27\n60\n30\n18\n30\n48\n12\n90\n24\n60\n36\n6\n0\n42\n12\n78\n36\n36\n24\n114\n6\n60\n0\n18\n6\n69\n18\n84\n0\n36\n6\n48\n6\n39\n24\n42\n24\n54\n6\n72\n48\n36\n42\n60\n0\n48\n0\n36\n18\n138\n24\n30\n30\n42\n18\n75\n18\n48\n18\n24\n0\n78\n0\n78\n57\n60\n9\n48\n9\n36\n30\n30\n42\n42\n39\n84\n0\n24\n12\n87\n27\n30\n42\n24\n24\n90\n0\n36\n24\n60\n36\n84\n0\n42\n0\n30\n21\n87\n12\n72\n24\n42\n12\n60\n30\n72\n21\n60\n0\n96\n12\n30\n42\n39\n18\n66\n12\n84\n12\n63\n42\n42\n24\n42\n0\n18\n6\n78\n15\n75\n45\n54\n12\n54\n6\n84\n30\n30\n18\n54\n0\n42\n24\n39\n27\n96\n18\n42\n21\n48\n0\n54\n18\n33\n36\n66\n0\n84\n0\n75\n48\n30\n42\n54\n12\n54\n15\n42\n30\n96\n18\n42\n0\n18\n6\n123\n15\n48\n24\n48\n39\n42\n6\n21\n54\n45\n12\n60\n0\n90\n12\n30\n36\n45\n18\n72\n21\n78\n12\n30\n12\n60\n30\n18\n0\n78\n6\n60\n36\n33\n18\n60\n12\n30\n0\n60\n18\n90\n30\n54\n0\n36\n1\n78\n27\n84\n30\n18\n15\n102\n9\n27\n30\n24\n57\n90\n0\n42\n9\n48\n42\n42\n12\n72\n27\n48\n9\n108\n18\n48\n48\n18\n0\n84\n6\n66\n24\n48\n21\n114\n6\n78\n24\n30\n30\n42\n18\n60\n0\n18\n12\n63\n9\n51\n66\n48\n15\n54\n0\n66\n60\n36\n18\n48\n0\n66\n6\n36\n30\n96\n9\n36\n30\n30\n24\n93\n24\n72\n24\n66\n0\n60\n24\n48\n30\n24\n30\n72\n6\n60\n12\n30\n12\n93\n18\n72\n0\n30\n0\n81\n30\n36\n48\n36\n30\n90\n6\n54\n24\n57\n24\n36\n0\n54\n18\n36\n24\n78\n18\n72\n33\n12\n0\n51\n30\n48\n24\n42\n0\n90\n3\n78\n30\n30\n27\n138\n6\n30\n18\n36\n24\n75\n24\n12\n0\n54\n12\n42\n18\n84\n36\n30\n18\n66\n6\n45\n36\n36\n48\n114\n0\n24\n6\n30\n21\n108\n15\n48\n18\n36\n18\n57\n24\n63\n42\n54\n0\n78\n6\n81\n36\n18\n24\n42\n18\n120\n0\n24\n24\n66\n12\n54\n0\n48\n12\n66\n18\n42\n36\n48\n18\n72\n6\n48\n48\n33\n6\n102\n0\n54\n24\n39\n54\n60\n12\n90\n18\n36\n3\n111\n24\n51\n48\n42\n0\n90\n0\n45\n36\n54\n48\n54\n24\n18\n18\n51\n18\n72\n0\n54\n0\n18\n12\n54\n36\n57\n18\n42\n18\n120\n0\n63\n42\n27\n36\n48\n0\n54\n6\n39\n30\n81\n18\n72\n33\n54\n9\n72\n12\n54\n54\n24\n0\n54\n15\n75\n24\n60\n12\n78\n6\n30\n12\n39\n54\n72\n6\n54\n0\n72\n6\n78\n12\n54\n39\n30\n15\n48\n6\n57\n48\n18\n24\n90\n0\n90\n18\n42\n24\n39\n42\n24\n30\n42\n0\n84\n6\n66\n30\n30\n0\n30\n0\n27\n42\n39\n33\n90\n24\n84\n18\n51\n36\n69\n24\n54\n0\n42\n18\n87\n33\n51\n18\n42\n9\n126\n9\n84\n36\n66\n18\n54\n0\n36\n0\n66\n12\n48\n15\n54\n30\n18\n18\n60\n18\n96\n54\n42\n0\n102\n0\n27\n36\n30\n36\n108\n15\n54\n0\n24\n36\n60\n24\n66\n0\n30\n0\n54\n15\n75\n48\n36\n18\n48\n24\n36\n36\n54\n15\n108\n0\n84\n18";

const char ans20[] = "0 0 0\n0\n0\n1\n0\n0\n0\n0\n3\n0\n0\n0\n0\n0\n3\n3\n0\n0";
signed main() {
    long int n;
    scanf("%ld", &n);

    if (10000 == n) {
        printf("%s", ans10000);
        return 0;
    }
    if (20 == n) {
        puts(ans20);

        return 0;
    }
    puts("0");

    return 0;
}

Measured memory_bytes: 3724