Problem: Dark Assembly is a governing body in the Netherworld. Here sit the senators who take the most important decisions for the player. For example, to expand the range of the shop or to improve certain characteristics of the character the Dark Assembly's approval is needed.

The Dark Assembly consists of n senators. Each of them is characterized by his level and loyalty to the player. The level is a positive integer which reflects a senator's strength. Loyalty is the probability of a positive decision in the voting, which is measured as a percentage with precision of up to 10%. 

Senators make decisions by voting. Each of them makes a positive or negative decision in accordance with their loyalty. If strictly more than half of the senators take a positive decision, the player's proposal is approved. 

If the player's proposal is not approved after the voting, then the player may appeal against the decision of the Dark Assembly. To do that, player needs to kill all the senators that voted against (there's nothing wrong in killing senators, they will resurrect later and will treat the player even worse). The probability that a player will be able to kill a certain group of senators is equal to A / (A + B), where A is the sum of levels of all player's characters and B is the sum of levels of all senators in this group. If the player kills all undesired senators, then his proposal is approved.

Senators are very fond of sweets. They can be bribed by giving them candies. For each received candy a senator increases his loyalty to the player by 10%. It's worth to mention that loyalty cannot exceed 100%. The player can take no more than k sweets to the courtroom. Candies should be given to the senators before the start of voting.

Determine the probability that the Dark Assembly approves the player's proposal if the candies are distributed among the senators in the optimal way.

Input

The first line contains three integers n, k and A (1 ≤ n, k ≤ 8, 1 ≤ A ≤ 9999).

Then n lines follow. The i-th of them contains two numbers — bi and li — the i-th senator's level and his loyalty.

The levels of all senators are integers in range from 1 to 9999 (inclusive). The loyalties of all senators are integers in range from 0 to 100 (inclusive) and all of them are divisible by 10.

Output

Print one real number with precision 10 - 6 — the maximal possible probability that the Dark Assembly approves the player's proposal for the best possible distribution of candies among the senators.

Examples

Input

5 6 100
11 80
14 90
23 70
80 30
153 70


Output

1.0000000000


Input

5 3 100
11 80
14 90
23 70
80 30
153 70


Output

0.9628442962


Input

1 3 20
20 20


Output

0.7500000000

Note

In the first sample the best way of candies' distribution is giving them to first three of the senators. It ensures most of votes.

It the second sample player should give all three candies to the fifth senator.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;







public class B2 {
	String s = null;

	String[] ss = null;
	int[][] sn = null;
	int n = 0;
	double ans = 1;
	int A = 0;
	public void run() throws Exception{

		BufferedReader br = null;
		File file = new File("input.txt");
		if(file.exists()){
			br = new BufferedReader(new FileReader("input.txt"));
		}
		else{
			br = new BufferedReader(new InputStreamReader(System.in));
		}
	
		s = br.readLine();
		ss = s.split(" ");
		
		
		
		n = Integer.parseInt(ss[0]);
		int k = Integer.parseInt(ss[1]);
		A = Integer.parseInt(ss[2]);
		sn = new int[n][2];

		for(int i = 0; i < n; i++){
			s = br.readLine();
			ss = s.split(" ");
			sn[i][0] = Integer.parseInt(ss[0]);
			sn[i][1] = Integer.parseInt(ss[1]);
		}

		int num = 0;
		for(int i = 0; i < n; i++){
			num += (100 - sn[i][1]) / 10;
		}
		if(k >= num){
			System.out.println("1.0");
			return;
		}
		
		check(0, k, sn);
		
		ans = 1 - ans;
		System.out.println(ans);
		
	}
	
	void check(int i, int k, int[][] sn){
		if(i == n && k == 0){
			check2(sn);
			return;
		}
		else if(i == n && k > 0){
			return;
		}
		else if(k == 0){
			check(i+1, k, sn);
		}
		else{
			for(int j = 0; j <= k; j++){
				if(sn[i][1] + j * 10 <= 100){
					int[][] nsn = copy(sn);
					nsn[i][1] += j * 10;
					check(i+1, k - j, nsn);
				}
			}
		}
	}
	
	void check2(int[][] sn){
		List<Integer> target = new ArrayList<Integer>();
		int h = 0;
		for(int i = 0; i < sn.length; i++){
			if(sn[i][1] != 100){
				target.add(i);
			}
			else{
				h++;
			}
		}
		if(h  > n / 2){
			System.out.println("1.0");
			System.exit(0);	
		}
		int makemax = n - h;
		int makemin = (n+1)/2;
		double ma = 0;
		for(int i = makemax; i >= makemin; i--){
			Combination c = new Combination(makemax, i);
			Iterator<int[]> ite = c.iterator();
			
			while(ite.hasNext()){
				int[] ret = ite.next();
				Set<Integer> make = new HashSet<Integer>();
				for(int j = 0; j < ret.length; j++){
					if(ret[j] > 0){
						make.add(target.get(j));
					}
				}
				double makeK = 1;
				int B = 0;
				for(int j = 0; j < n; j++){
					int perc = 0;
					if(make.contains(j)){
						perc = 100 - sn[j][1];
						B += sn[j][0];
					}
					else{
						perc = sn[j][1];
					}
					makeK *= ((double)perc / 100);
				}
				ma += makeK * (1 - (double)A/(A+B));
			}
			
		}
		ans = Math.min(ans, ma);
	}
	
	int[][] copy(int[][] sn){
		int[][] csn = new int[sn.length][2];
		
		for(int i = 0; i < sn.length; i++){
			csn[i][0] = sn[i][0];
			csn[i][1] = sn[i][1];
		}
		
		return csn;
	}
	

	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		B2 t = new B2();
		t.run();

	}

	
	public class Combination implements Iterable<int[]> {
		private final int max;
		private final int select;
		
		public Combination(int max, int select) {
			if (max < 1 || 62 < max) {
				throw new IllegalArgumentException();
			}
			this.max = max;
			this.select = select;
		}
	
		public Iterator<int[]> iterator() {
			return new CombinationIterator(max, select);
		}
		
		private class CombinationIterator implements Iterator<int[]> {
			private long value;
			private final long max;
			private final int size;
			private int[] ret = null;
			public CombinationIterator(int max, int select) {
				this.value = (1L << select) - 1L;
				this.size = max;
				this.max = 1L << max;
				this.ret = new int[size];
			}

	
			public boolean hasNext() {
				return value < max;
			}


			public int[] next() {
				long stock = value;
				value = next(value);
				
				for(int i = 0; i < size; i++){
					long tmp = stock >> i;
					tmp = tmp & 1;
					ret[i] = (int)tmp;
				}
				
				return ret;
			}

	
			public void remove() {
				throw new UnsupportedOperationException();
			}

			private long next(long source) {
				long param1 = smallestBitOf(source);
				long param2 = param1 + source;
				long param3 = smallestBitOf(param2);
				long param5 = (param3 / param1) >>> 1;
				return param5 - 1 + param2;
			}

			private long smallestBitOf(long source) {
				long result = 1L;
				while (source % 2 == 0) {
					source >>>= 1;
					result <<= 1;
				}
				return result;
			}
		}
	}
}