aboutsummaryrefslogtreecommitdiff
path: root/codeforces/ParanormixPredictions
diff options
context:
space:
mode:
Diffstat (limited to 'codeforces/ParanormixPredictions')
-rw-r--r--codeforces/ParanormixPredictions/inp0
-rwxr-xr-xcodeforces/ParanormixPredictions/mainbin0 -> 32368 bytes
-rw-r--r--codeforces/ParanormixPredictions/main.cpp25
-rw-r--r--codeforces/ParanormixPredictions/main_input0.txt1
-rw-r--r--codeforces/ParanormixPredictions/main_input1.txt1
-rw-r--r--codeforces/ParanormixPredictions/main_input2.txt1
-rw-r--r--codeforces/ParanormixPredictions/main_output0.txt1
-rw-r--r--codeforces/ParanormixPredictions/main_output1.txt1
-rw-r--r--codeforces/ParanormixPredictions/main_output2.txt1
9 files changed, 31 insertions, 0 deletions
diff --git a/codeforces/ParanormixPredictions/inp b/codeforces/ParanormixPredictions/inp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/codeforces/ParanormixPredictions/inp
diff --git a/codeforces/ParanormixPredictions/main b/codeforces/ParanormixPredictions/main
new file mode 100755
index 0000000..eddd98f
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main
Binary files differ
diff --git a/codeforces/ParanormixPredictions/main.cpp b/codeforces/ParanormixPredictions/main.cpp
new file mode 100644
index 0000000..771fafc
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main.cpp
@@ -0,0 +1,25 @@
+#include<bits/stdc++.h>
+
+using namespace std;
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int n, m;
+ cin >> n >> m;
+ vector<int> primes;
+ for(int i = 2; i <= 50;i++) {
+ bool ok = 1;
+ for(int j = 2; j * j <= i; j++) {
+ if(i % j == 0) {
+ ok = 0;
+ break;
+ }
+ }
+ if(ok) {
+ primes.push_back(i);
+ }
+ }
+ int indx = (upper_bound(primes.begin(), primes.end(), n) - primes.begin());
+ (m == primes[indx]) ? cout << "YES" : cout << "NO";
+}
diff --git a/codeforces/ParanormixPredictions/main_input0.txt b/codeforces/ParanormixPredictions/main_input0.txt
new file mode 100644
index 0000000..99818b5
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_input0.txt
@@ -0,0 +1 @@
+3 5
diff --git a/codeforces/ParanormixPredictions/main_input1.txt b/codeforces/ParanormixPredictions/main_input1.txt
new file mode 100644
index 0000000..156c178
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_input1.txt
@@ -0,0 +1 @@
+7 11
diff --git a/codeforces/ParanormixPredictions/main_input2.txt b/codeforces/ParanormixPredictions/main_input2.txt
new file mode 100644
index 0000000..a5b6096
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_input2.txt
@@ -0,0 +1 @@
+7 9
diff --git a/codeforces/ParanormixPredictions/main_output0.txt b/codeforces/ParanormixPredictions/main_output0.txt
new file mode 100644
index 0000000..f033a50
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_output0.txt
@@ -0,0 +1 @@
+YES
diff --git a/codeforces/ParanormixPredictions/main_output1.txt b/codeforces/ParanormixPredictions/main_output1.txt
new file mode 100644
index 0000000..f033a50
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_output1.txt
@@ -0,0 +1 @@
+YES
diff --git a/codeforces/ParanormixPredictions/main_output2.txt b/codeforces/ParanormixPredictions/main_output2.txt
new file mode 100644
index 0000000..5e35d1b
--- /dev/null
+++ b/codeforces/ParanormixPredictions/main_output2.txt
@@ -0,0 +1 @@
+NO