import java.util.*; public class Exercise143{ public static double winGames; public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; ArrayList b = new ArrayList(); for(int i = 0; i < n; i++){ a[i] = sc.nextInt(); } for(int i = 0; i < n; i++){ b.add(sc.nextInt()); } double sumGames = 1; winGames = 0; for(int i = 0; i < n; i++){ sumGames *= n - i; } permute(n, a, b, 0); System.out.println(winGames / sumGames); } private static void permute (int n, int[] a, ArrayList b, int k){ for(int i = k; i < b.size(); i++){ Collections.swap(b, i, k); permute(n, a, b, k + 1); Collections.swap(b, k, i); } if(k == b.size() - 1){ if(judge(n, a, b)){ winGames++; } } } private static boolean judge (int n, int[] a, ArrayList b){ int win = 0; for(int i = 0; i < n; i++){ if(a[i] > b.get(i)){ win++; } } if(win > n / 2){ return true; }else{ return false; } } }