P27891 [洛谷] [NICA #3] CPU
普及-
题目描述

Problem Description

To achieve stronger performance on limited chip area, Intel Corporation has adopted a hybrid architecture CPU design.

Specifically, for a CPU, there are two types of cores:
- Performance cores (P cores) offer stronger performance. Each performance core can provide 2 threads. A CPU must have at least 1 performance core;
- Efficiency cores (E cores) can achieve performance advantages at low power. Each efficiency core can provide 1 thread. A CPU may have no efficiency cores;

For example, an Intel Core i5-13600K CPU has 6 performance cores and 8 efficiency cores, totaling 14 cores and 20 threads.

Given the total number of cores and threads of a CPU, determine how many performance cores and efficiency cores it has.

Input Format

A single line with two positive integers $c, t$, representing the total number of cores and threads respectively.

Output Format

If there exists a hybrid architecture CPU design that meets the requirements, output a single line with two positive integers $p, e$, representing the number of performance cores and efficiency cores respectively.

Otherwise, output a single line with the string Error.

Sample Input and Output

Sample Input #1

14 20

Sample Output #1

6 8

Sample Input #2

12 26

Sample Output #2

Error

Notes

Sample Explanation

For the first sample, refer to the problem description;

For the second sample, it is clear that no CPU design exists that has 12 cores and 26 threads, hence the output Error.

Data Range

For all data, $1 \leq c, t \leq 100$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
14 20
样例输出
6 8