Issues with variables dimentions

Hello,
I'm working on a robotic project and I'm trying to implement inverse kinematics.
My issue is that, with an Arduino Uno R3, I can't seem to figure out how to work with big numbers.
An example would be 2147299: the correct result is 87906 but the arduino displays 22370 as the result. This result is given when using a long variable, which should go as far as 2^35.
I don't really know what the problem could be and I can't seem to find any solution online.
If anyone has any idea why this is happening, it would help me a lot!
Thanks
P.S. I'll be inserting the basic code I estrapulated from the more complex code of my project in order to examine better the problem

long a;

void setup() {
  Serial.begin(9600);
  a = 2*147*299;
  Serial.println(a);
}

void loop() {

}

0 to 2^32 for unsigned long. -(2^31) to (2^31-1) for long.

uint32_t a;

void setup() {
  Serial.begin(115200);
  a = 2*147*299UL;
  Serial.println(a);
}

void loop() {

}

That's great, thank you so much. The code works but I can't seem to make it work if I use variables instead of the three values inside the multiplication.
Is this a syntax error?

uint32_t a;
int b = 147;
int c = 299;
int d = 2;

void setup() {
  Serial.begin(9600);
  a = b*c*d UL;
  Serial.println(a);
}

void loop() {

}

What did the compiler say about it?

The compiler doesn’t signal any error but still does the calculation wrong

That’s perfect, It works perfectly now.
Thank you to all of you!

Are you sure? I get this because the UL is only for integer literal constants:

sketch_mar11a:8:13: error: expected ';' before 'UL'
   a = b*c*d UL;
             ^~
exit status 1
expected ';' before 'UL'

Why not just use the an appropriate datatype to begin with?

uint32_t a;
uint32_t b = 147;
uint32_t c = 299;
uint32_t d = 2;

void setup() {
  Serial.begin(115200);
  a = b*c*d;
  Serial.println(a);
}

void loop() {
}