#include <stdio.h> int main() { int L, C; scanf("%d", &L); scanf("%d", &C); printf("%d\n", (L*(C*2-1))-(C-1)); printf("%d", (L-1 + C-1)*2); return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: