text: ## A Coin Problem
  
  View as PDF
  
  Points: 7 (partial)
  Time limit: 2.0s
  Memory limit: 128M
  
  Author:
  Problem type
  
  Your parents have generously given you $$N$$ types of coins with various denominations. They would like to know if there is some combination of coins that sum up to the value $$S$$.
  
  #### Input Specification
  
  The first line will contain two integers $$N, S\ (1 \le N \le 100, 1 \le S \le 10\ 000)$$.
  
  The second line will contain $$N$$ integers, $$c_1, c_2, \ldots, c_N\ (1 \le c_i \le 1\ 000)$$ the denominations of the coins that your parents will give you. Note that the same denomination of coin may be used multiple times.
  
  #### Output Specification
  
  Print YES if it is possible to use some combination of the coins to sum up to $$S$$, or NO otherwise.
  
  3 6
  1 4 5
  
  YES
  
  #### Explanation for Sample 1
  
  We can use $$6$$ coins of value $$1$$ to make the sum of $$S = 6$$. Note that there are other ways as well.
  
  2 11
  3 7
  
  NO
  
  #### Explanation for Sample 2
  
  There are no ways to make $$S = 11$$ with coins of value $$3$$ and $$7$$.
  
  2 7
  3 2
  
  YES
  
  #### Explanation for Sample 3
  
  We can use $$1$$ coin of value $$3$$ and $$2$$ coins of value $$2$$ to make a total sum of $$7$$.
explanation: The document describes a problem involving coin denominations and determining if a combination of these coins can sum up to a given value. It includes a problem statement, input and output specifications, and sample inputs with corresponding outputs and explanations.
  
  The document contains multiple questions (sample inputs) and their answers (sample outputs and explanations).
distilabel_metadata.content: Evaluate the user given text extract and determine if it contains a math question and optionally and answer to this question.
  
  Output rules:
  
  1. Briefly describe the document and mention if it contains a question or a question and answer.
  2. Finalize the output with: Label: no-question,question,question-and-answer,multiple-question,multiple-question-and-answer
distilabel_metadata.role: system
distilabel_metadata.content: ## A Coin Problem
  
  View as PDF
  
  Points: 7 (partial)
  Time limit: 2.0s
  Memory limit: 128M
  
  Author:
  Problem type
  
  Your parents have generously given you $$N$$ types of coins with various denominations. They would like to know if there is some combination of coins that sum up to the value $$S$$.
  
  #### Input Specification
  
  The first line will contain two integers $$N, S\ (1 \le N \le 100, 1 \le S \le 10\ 000)$$.
  
  The second line will contain $$N$$ integers, $$c_1, c_2, \ldots, c_N\ (1 \le c_i \le 1\ 000)$$ the denominations of the coins that your parents will give you. Note that the same denomination of coin may be used multiple times.
  
  #### Output Specification
  
  Print YES if it is possible to use some combination of the coins to sum up to $$S$$, or NO otherwise.
  
  3 6
  1 4 5
  
  YES
  
  #### Explanation for Sample 1
  
  We can use $$6$$ coins of value $$1$$ to make the sum of $$S = 6$$. Note that there are other ways as well.
  
  2 11
  3 7
  
  NO
  
  #### Explanation for Sample 2
  
  There are no ways to make $$S = 11$$ with coins of value $$3$$ and $$7$$.
  
  2 7
  3 2
  
  YES
  
  #### Explanation for Sample 3
  
  We can use $$1$$ coin of value $$3$$ and $$2$$ coins of value $$2$$ to make a total sum of $$7$$.
distilabel_metadata.role: user
distilabel_metadata.raw_output_q_a_detector_0: The document describes a problem involving coin denominations and determining if a combination of these coins can sum up to a given value. It includes a problem statement, input and output specifications, and sample inputs with corresponding outputs and explanations.
  
  The document contains multiple questions (sample inputs) and their answers (sample outputs and explanations).
  
  Label: multiple-question-and-answer