#include <stdio.h>
//#define gcd3(a, b, c) gcd(gcd((a), (b)), (c)) #define lcm(a, b) ((a) * (b) / gcd((a), (b)))
int gcd(int a, int b) { int r; do { r = a % b; a = b; b = r; } while (r != 0); return a; }
int lcm3(int a, int b, int c) { int d = lcm(a, b); return lcm(d, c); }
int main(void) { int a, b, c; scanf("%d%d%d", &a, &b, &c); printf("%d\n", lcm3(a, b, c)); return 0; }
|