#include <iostream>
using namespace std;
int main() {
int numbers[5];
int minNum = 100;
for (int i = 0; i < 5; i++) {
cin >> numbers[i];
if (numbers[i] < minNum) minNum = numbers[i];
}
int n = minNum;
while (true) {
int count = 0;
for (int i = 0; i < 5; i++) {
if (n % numbers[i] == 0) count++;
}
if (count >= 3) break;
n++;
}
cout << n;
return 0;
}
#include <iostream>
using namespace std;
int main() {
while (true) {
int a, b;
cin >> a >> b;
if (a == 0 && b == 0) break;
if (a > b) cout << "Yes" << '\n';
else cout << "No" << '\n';
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<char>> room(n, vector<char>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> room[i][j];
}
}
int count = 0;
for (int i = 0; i < n; i++) {
char previous = '.';
for (int j = 0; j < m; j++) {
if (room[i][j] == '-') {
if (room[i][j] != previous) count++;
}
previous = room[i][j];
}
}
for (int j = 0; j < m; j++) {
char previous = '.';
for (int i = 0; i < n; i++) {
if (room[i][j] == '|') {
if (room[i][j] != previous) count++;
}
previous = room[i][j];
}
}
cout << count;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n, f;
cin >> n >> f;
n = n / 100 * 100;
for (int i = 0; i < 100; i++) {
if ((n + i) % f == 0) {
n = n + i;
break;
}
}
cout << n / 10 % 10 << n % 10;
return 0;
}